Skip to content

Commit

Permalink
[csharp][generichost] Delete samples (#18323)
Browse files Browse the repository at this point in the history
* delete samples

* rebuild samples

* test to see if the pr gate fails

* make the samples generate twice

* pr gate successfully failed

* minor cleanup

* minor cleanup
  • Loading branch information
devhl-labs committed Apr 16, 2024
1 parent c109399 commit 7b0f963
Show file tree
Hide file tree
Showing 28 changed files with 229 additions and 604 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,23 @@ jobs:
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
- name: Delete samples that are entirely generated
run: |
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
- name: Generate samples
run: bash bin/generate-samples.sh
run: |
bash bin/generate-samples.sh
# when a sample is deleted, you have to generate it twice for all files to get created
bash bin/generate-samples.sh
- name: Verify git status
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ public async Task GetArrayOfEnumsAsyncTest()
Assert.IsType<List<OuterEnum>>(model);
}

/// <summary>
/// Test TestAdditionalPropertiesReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestAdditionalPropertiesReferenceAsyncTest()
{
Dictionary<string, Object> requestBody = default!;
await _instance.TestAdditionalPropertiesReferenceAsync(requestBody);
}

/// <summary>
/// Test TestBodyWithFileSchema
/// </summary>
Expand Down Expand Up @@ -257,5 +267,15 @@ public async Task TestQueryParameterCollectionFormatAsyncTest()
Client.Option<string?> notRequiredNullable = default!;
await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
}

/// <summary>
/// Test TestStringMapReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestStringMapReferenceAsyncTest()
{
Dictionary<string, string> requestBody = default!;
await _instance.TestStringMapReferenceAsync(requestBody);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public void ClassModelInstanceTest()
}

/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public void FooGetDefaultResponseInstanceTest()
}

/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public void FormatTestInstanceTest()
}

/// <summary>
/// Test the property 'VarByte'
/// Test the property 'Byte'
/// </summary>
[Fact]
public void VarByteTest()
public void ByteTest()
{
// TODO unit test for the property 'VarByte'
// TODO unit test for the property 'Byte'
}

/// <summary>
Expand Down Expand Up @@ -108,30 +108,30 @@ public void DateTimeTest()
}

/// <summary>
/// Test the property 'VarDecimal'
/// Test the property 'Decimal'
/// </summary>
[Fact]
public void VarDecimalTest()
public void DecimalTest()
{
// TODO unit test for the property 'VarDecimal'
// TODO unit test for the property 'Decimal'
}

/// <summary>
/// Test the property 'VarDouble'
/// Test the property 'Double'
/// </summary>
[Fact]
public void VarDoubleTest()
public void DoubleTest()
{
// TODO unit test for the property 'VarDouble'
// TODO unit test for the property 'Double'
}

/// <summary>
/// Test the property 'VarFloat'
/// Test the property 'Float'
/// </summary>
[Fact]
public void VarFloatTest()
public void FloatTest()
{
// TODO unit test for the property 'VarFloat'
// TODO unit test for the property 'Float'
}

/// <summary>
Expand Down Expand Up @@ -189,12 +189,12 @@ public void PatternWithDigitsAndDelimiterTest()
}

/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}

/// <summary>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public void Model200ResponseInstanceTest()
}

/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ public void ReturnInstanceTest()
//Assert.IsType<Return>(instance);
}

/// <summary>
/// Test the property 'Lock'
/// </summary>
[Fact]
public void LockTest()
{
// TODO unit test for the property 'Lock'
}

/// <summary>
/// Test the property 'Abstract'
/// </summary>
[Fact]
public void AbstractTest()
{
// TODO unit test for the property 'Abstract'
}

/// <summary>
/// Test the property 'VarReturn'
/// </summary>
Expand All @@ -61,5 +79,14 @@ public void VarReturnTest()
{
// TODO unit test for the property 'VarReturn'
}

/// <summary>
/// Test the property 'Unsafe'
/// </summary>
[Fact]
public void UnsafeTest()
{
// TODO unit test for the property 'Unsafe'
}
}
}

0 comments on commit 7b0f963

Please sign in to comment.