@@ -47,17 +47,18 @@ public void ParseDocumentFromInlineStringShouldSucceed()
4747 } ) ;
4848
4949 context . ShouldBeEquivalentTo (
50- new OpenApiDiagnostic ( ) ) ;
50+ new OpenApiDiagnostic ( ) { SpecificationVersion = OpenApiSpecVersion . OpenApi3_0 } ) ;
5151 }
5252
5353 [ Fact ]
5454 public void ParseBasicDocumentWithMultipleServersShouldSucceed ( )
5555 {
5656 using ( var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "basicDocumentWithMultipleServers.yaml" ) ) )
5757 {
58- var openApiDoc = new OpenApiStreamReader ( ) . Read ( stream , out var context ) ;
58+ var openApiDoc = new OpenApiStreamReader ( ) . Read ( stream , out var diagnostic ) ;
5959
60- context . ShouldBeEquivalentTo ( new OpenApiDiagnostic ( ) ) ;
60+ diagnostic . ShouldBeEquivalentTo (
61+ new OpenApiDiagnostic ( ) { SpecificationVersion = OpenApiSpecVersion . OpenApi3_0 } ) ;
6162
6263 openApiDoc . ShouldBeEquivalentTo (
6364 new OpenApiDocument
@@ -89,7 +90,7 @@ public void ParseBrokenMinimalDocumentShouldYieldExpectedDiagnostic()
8990 {
9091 using ( var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "brokenMinimalDocument.yaml" ) ) )
9192 {
92- var openApiDoc = new OpenApiStreamReader ( ) . Read ( stream , out var context ) ;
93+ var openApiDoc = new OpenApiStreamReader ( ) . Read ( stream , out var diagnostic ) ;
9394
9495 openApiDoc . ShouldBeEquivalentTo (
9596 new OpenApiDocument
@@ -100,13 +101,14 @@ public void ParseBrokenMinimalDocumentShouldYieldExpectedDiagnostic()
100101 }
101102 } ) ;
102103
103- context . ShouldBeEquivalentTo (
104+ diagnostic . ShouldBeEquivalentTo (
104105 new OpenApiDiagnostic
105106 {
106107 Errors =
107108 {
108109 new OpenApiError ( "#/info" , "title is a required property" )
109- }
110+ } ,
111+ SpecificationVersion = OpenApiSpecVersion . OpenApi3_0
110112 } ) ;
111113 }
112114 }
@@ -116,7 +118,7 @@ public void ParseMinimalDocumentShouldSucceed()
116118 {
117119 using ( var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "minimalDocument.yaml" ) ) )
118120 {
119- var openApiDoc = new OpenApiStreamReader ( ) . Read ( stream , out var context ) ;
121+ var openApiDoc = new OpenApiStreamReader ( ) . Read ( stream , out var diagnostic ) ;
120122
121123 openApiDoc . ShouldBeEquivalentTo (
122124 new OpenApiDocument
@@ -128,8 +130,8 @@ public void ParseMinimalDocumentShouldSucceed()
128130 }
129131 } ) ;
130132
131- context . ShouldBeEquivalentTo (
132- new OpenApiDiagnostic ( ) ) ;
133+ diagnostic . ShouldBeEquivalentTo (
134+ new OpenApiDiagnostic ( ) { SpecificationVersion = OpenApiSpecVersion . OpenApi3_0 } ) ;
133135 }
134136 }
135137
@@ -541,7 +543,8 @@ public void ParseStandardPetStoreDocumentShouldSucceed()
541543 actual . ShouldBeEquivalentTo ( expected ) ;
542544 }
543545
544- context . ShouldBeEquivalentTo ( new OpenApiDiagnostic ( ) ) ;
546+ context . ShouldBeEquivalentTo (
547+ new OpenApiDiagnostic ( ) { SpecificationVersion = OpenApiSpecVersion . OpenApi3_0 } ) ;
545548 }
546549
547550 [ Fact ]
@@ -1042,7 +1045,8 @@ public void ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
10421045 actual . ShouldBeEquivalentTo ( expected ) ;
10431046 }
10441047
1045- context . ShouldBeEquivalentTo ( new OpenApiDiagnostic ( ) ) ;
1048+ context . ShouldBeEquivalentTo (
1049+ new OpenApiDiagnostic ( ) { SpecificationVersion = OpenApiSpecVersion . OpenApi3_0 } ) ;
10461050 }
10471051
10481052 [ Fact ]
@@ -1057,7 +1061,8 @@ public void ParsePetStoreExpandedShouldSucceed()
10571061 // TODO: Create the object in memory and compare with the one read from YAML file.
10581062 }
10591063
1060- context . ShouldBeEquivalentTo ( new OpenApiDiagnostic ( ) ) ;
1064+ context . ShouldBeEquivalentTo (
1065+ new OpenApiDiagnostic ( ) { SpecificationVersion = OpenApiSpecVersion . OpenApi3_0 } ) ;
10611066 }
10621067 }
10631068}
0 commit comments