Skip to content

Commit faca076

Browse files
committed
chore: linting
Signed-off-by: Vincent Biret <[email protected]>
1 parent a8153e9 commit faca076

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void ParseInlineStringWithoutProvidingFormatSucceeds()
113113
[Fact]
114114
public async Task ParseBasicDocumentWithMultipleServersShouldSucceed()
115115
{
116-
var path = System.IO.Path.Combine(SampleFolderPath, "basicDocumentWithMultipleServers.yaml");
116+
var path = Path.Combine(SampleFolderPath, "basicDocumentWithMultipleServers.yaml");
117117
var result = await OpenApiDocument.LoadAsync(path);
118118

119119
Assert.Empty(result.Diagnostic.Errors);
@@ -144,13 +144,13 @@ public async Task ParseBasicDocumentWithMultipleServersShouldSucceed()
144144
[Fact]
145145
public async Task ParseBrokenMinimalDocumentShouldYieldExpectedDiagnostic()
146146
{
147-
using var stream = Resources.GetStream(System.IO.Path.Combine(SampleFolderPath, "brokenMinimalDocument.yaml"));
147+
using var stream = Resources.GetStream(Path.Combine(SampleFolderPath, "brokenMinimalDocument.yaml"));
148148
// Copy stream to MemoryStream
149149
using var memoryStream = new MemoryStream();
150150
await stream.CopyToAsync(memoryStream);
151151
memoryStream.Position = 0;
152152

153-
var result = OpenApiDocument.Load(memoryStream);
153+
var result = await OpenApiDocument.LoadAsync(memoryStream);
154154

155155
result.Document.Should().BeEquivalentTo(
156156
new OpenApiDocument
@@ -176,7 +176,7 @@ public async Task ParseBrokenMinimalDocumentShouldYieldExpectedDiagnostic()
176176
[Fact]
177177
public async Task ParseMinimalDocumentShouldSucceed()
178178
{
179-
var result = await OpenApiDocument.LoadAsync(System.IO.Path.Combine(SampleFolderPath, "minimalDocument.yaml"));
179+
var result = await OpenApiDocument.LoadAsync(Path.Combine(SampleFolderPath, "minimalDocument.yaml"));
180180

181181
result.Document.Should().BeEquivalentTo(
182182
new OpenApiDocument
@@ -199,7 +199,7 @@ public async Task ParseMinimalDocumentShouldSucceed()
199199
[Fact]
200200
public async Task ParseStandardPetStoreDocumentShouldSucceed()
201201
{
202-
using var stream = Resources.GetStream(System.IO.Path.Combine(SampleFolderPath, "petStore.yaml"));
202+
using var stream = Resources.GetStream(Path.Combine(SampleFolderPath, "petStore.yaml"));
203203
var actual = await OpenApiDocument.LoadAsync(stream, OpenApiConstants.Yaml);
204204

205205
var components = new OpenApiComponents
@@ -585,7 +585,7 @@ public async Task ParseStandardPetStoreDocumentShouldSucceed()
585585
[Fact]
586586
public async Task ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
587587
{
588-
using var stream = Resources.GetStream(System.IO.Path.Combine(SampleFolderPath, "petStoreWithTagAndSecurity.yaml"));
588+
using var stream = Resources.GetStream(Path.Combine(SampleFolderPath, "petStoreWithTagAndSecurity.yaml"));
589589
var actual = await OpenApiDocument.LoadAsync(stream, OpenApiConstants.Yaml);
590590

591591
var components = new OpenApiComponents
@@ -1089,7 +1089,7 @@ public async Task ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
10891089
[Fact]
10901090
public async Task ParsePetStoreExpandedShouldSucceed()
10911091
{
1092-
var actual = await OpenApiDocument.LoadAsync(System.IO.Path.Combine(SampleFolderPath, "petStoreExpanded.yaml"));
1092+
var actual = await OpenApiDocument.LoadAsync(Path.Combine(SampleFolderPath, "petStoreExpanded.yaml"));
10931093

10941094
// TODO: Create the object in memory and compare with the one read from YAML file.
10951095

@@ -1100,7 +1100,7 @@ public async Task ParsePetStoreExpandedShouldSucceed()
11001100
[Fact]
11011101
public async Task GlobalSecurityRequirementShouldReferenceSecurityScheme()
11021102
{
1103-
var result = await OpenApiDocument.LoadAsync(System.IO.Path.Combine(SampleFolderPath, "securedApi.yaml"));
1103+
var result = await OpenApiDocument.LoadAsync(Path.Combine(SampleFolderPath, "securedApi.yaml"));
11041104

11051105
var securityRequirement = result.Document.SecurityRequirements[0];
11061106

@@ -1111,7 +1111,7 @@ public async Task GlobalSecurityRequirementShouldReferenceSecurityScheme()
11111111
[Fact]
11121112
public async Task HeaderParameterShouldAllowExample()
11131113
{
1114-
var result = await OpenApiDocument.LoadAsync(System.IO.Path.Combine(SampleFolderPath, "apiWithFullHeaderComponent.yaml"));
1114+
var result = await OpenApiDocument.LoadAsync(Path.Combine(SampleFolderPath, "apiWithFullHeaderComponent.yaml"));
11151115

11161116
var exampleHeader = result.Document.Components?.Headers?["example-header"];
11171117
Assert.NotNull(exampleHeader);
@@ -1179,7 +1179,7 @@ public async Task ParseDocumentWithReferencedSecuritySchemeWorks()
11791179
ReferenceResolution = ReferenceResolutionSetting.ResolveLocalReferences
11801180
};
11811181

1182-
var result = await OpenApiDocument.LoadAsync(System.IO.Path.Combine(SampleFolderPath, "docWithSecuritySchemeReference.yaml"), settings);
1182+
var result = await OpenApiDocument.LoadAsync(Path.Combine(SampleFolderPath, "docWithSecuritySchemeReference.yaml"), settings);
11831183
var securityScheme = result.Document.Components.SecuritySchemes["OAuth2"];
11841184

11851185
// Assert
@@ -1191,7 +1191,7 @@ public async Task ParseDocumentWithReferencedSecuritySchemeWorks()
11911191
public async Task ParseDocumentWithJsonSchemaReferencesWorks()
11921192
{
11931193
// Arrange
1194-
using var stream = Resources.GetStream(System.IO.Path.Combine(SampleFolderPath, "docWithJsonSchema.yaml"));
1194+
using var stream = Resources.GetStream(Path.Combine(SampleFolderPath, "docWithJsonSchema.yaml"));
11951195

11961196
// Act
11971197
var settings = new OpenApiReaderSettings
@@ -1311,7 +1311,7 @@ public async Task ParseDocWithRefsUsingProxyReferencesSucceeds()
13111311
format: int32
13121312
default: 10";
13131313

1314-
using var stream = Resources.GetStream(System.IO.Path.Combine(SampleFolderPath, "minifiedPetStore.yaml"));
1314+
using var stream = Resources.GetStream(Path.Combine(SampleFolderPath, "minifiedPetStore.yaml"));
13151315

13161316
// Act
13171317
var doc = (await OpenApiDocument.LoadAsync(stream)).Document;
@@ -1400,7 +1400,7 @@ public void ParseBasicDocumentWithServerVariableAndNoDefaultShouldFail()
14001400
[Fact]
14011401
public async Task ParseDocumentWithEmptyPathsSucceeds()
14021402
{
1403-
var result = await OpenApiDocument.LoadAsync(System.IO.Path.Combine(SampleFolderPath, "docWithEmptyPaths.yaml"));
1403+
var result = await OpenApiDocument.LoadAsync(Path.Combine(SampleFolderPath, "docWithEmptyPaths.yaml"));
14041404
Assert.Empty(result.Diagnostic.Errors);
14051405
}
14061406
}

0 commit comments

Comments
 (0)