6
6
namespace OpenApiTests . SchemaProperties . NullableReferenceTypesDisabled ;
7
7
8
8
public sealed class NullabilityTests
9
- : IClassFixture < OpenApiTestContext < SchemaPropertiesStartup < NullableReferenceTypesDisabledDbContext > , NullableReferenceTypesDisabledDbContext > >
9
+ : IClassFixture < OpenApiTestContext < OpenApiStartup < NullableReferenceTypesDisabledDbContext > , NullableReferenceTypesDisabledDbContext > >
10
10
{
11
- private readonly OpenApiTestContext < SchemaPropertiesStartup < NullableReferenceTypesDisabledDbContext > , NullableReferenceTypesDisabledDbContext > _testContext ;
11
+ private readonly OpenApiTestContext < OpenApiStartup < NullableReferenceTypesDisabledDbContext > , NullableReferenceTypesDisabledDbContext > _testContext ;
12
12
13
- public NullabilityTests (
14
- OpenApiTestContext < SchemaPropertiesStartup < NullableReferenceTypesDisabledDbContext > , NullableReferenceTypesDisabledDbContext > testContext )
13
+ public NullabilityTests ( OpenApiTestContext < OpenApiStartup < NullableReferenceTypesDisabledDbContext > , NullableReferenceTypesDisabledDbContext > testContext )
15
14
{
16
15
_testContext = testContext ;
17
16
@@ -20,7 +19,7 @@ public NullabilityTests(
20
19
}
21
20
22
21
[ Fact ]
23
- public async Task Resource_produces_expected_nullable_properties_in_schema ( )
22
+ public async Task Produces_expected_nullable_properties_in_schema_for_resource ( )
24
23
{
25
24
// Act
26
25
JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
@@ -30,7 +29,7 @@ public async Task Resource_produces_expected_nullable_properties_in_schema()
30
29
{
31
30
propertiesElement . ShouldContainPath ( "name" ) . With ( propertyElement =>
32
31
{
33
- propertyElement . ShouldContainPath ( "nullable" ) . With ( nullableProperty => nullableProperty . ValueKind . Should ( ) . Be ( JsonValueKind . True ) ) ;
32
+ propertyElement . ShouldContainPath ( "nullable" ) . With ( element => element . ValueKind . Should ( ) . Be ( JsonValueKind . True ) ) ;
34
33
} ) ;
35
34
36
35
propertiesElement . ShouldContainPath ( "nameOfCurrentFarm" ) . With ( propertyElement =>
@@ -50,7 +49,7 @@ public async Task Resource_produces_expected_nullable_properties_in_schema()
50
49
51
50
propertiesElement . ShouldContainPath ( "timeAtCurrentFarmInDays" ) . With ( propertyElement =>
52
51
{
53
- propertyElement . ShouldContainPath ( "nullable" ) . With ( nullableProperty => nullableProperty . ValueKind . Should ( ) . Be ( JsonValueKind . True ) ) ;
52
+ propertyElement . ShouldContainPath ( "nullable" ) . With ( element => element . ValueKind . Should ( ) . Be ( JsonValueKind . True ) ) ;
54
53
} ) ;
55
54
56
55
propertiesElement . ShouldContainPath ( "hasProducedEggs" ) . With ( propertyElement =>
@@ -60,3 +59,4 @@ public async Task Resource_produces_expected_nullable_properties_in_schema()
60
59
} ) ;
61
60
}
62
61
}
62
+
0 commit comments