File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
test/Microsoft.OpenApi.Tests/Services Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,23 @@ public void ReturnFilteredOpenApiDocumentBasedOnPostmanCollection()
69
69
Assert . Equal ( 3 , subsetOpenApiDocument . Paths . Count ) ;
70
70
}
71
71
72
+ [ Fact ]
73
+ public void ShouldParseNestedPostmanCollection ( )
74
+ {
75
+ // Arrange
76
+ var filePath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "UtilityFiles\\ postmanCollection_ver3.json" ) ;
77
+ var fileInput = new FileInfo ( filePath ) ;
78
+ var stream = fileInput . OpenRead ( ) ;
79
+
80
+ // Act
81
+ var requestUrls = OpenApiService . ParseJsonCollectionFile ( stream , _logger ) ;
82
+ var pathCount = requestUrls . Count ;
83
+
84
+ // Assert
85
+ Assert . NotNull ( requestUrls ) ;
86
+ Assert . Equal ( 30 , pathCount ) ;
87
+ }
88
+
72
89
[ Fact ]
73
90
public void ThrowsExceptionWhenUrlsInCollectionAreMissingFromSourceDocument ( )
74
91
{
You can’t perform that action at this time.
0 commit comments