Skip to content

Commit 463a3fc

Browse files
committed
Add unit tests
1 parent f6e5f1d commit 463a3fc

File tree

6 files changed

+529
-8
lines changed

6 files changed

+529
-8
lines changed

src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ public static IOpenApiAny GetSpecificOpenApiAny(IOpenApiAny openApiAny, OpenApiS
170170

171171
if (type == "integer")
172172
{
173-
if (long.TryParse(value, out var longValue))
173+
if (int.TryParse(value, out var intValue))
174174
{
175-
return new OpenApiLong(longValue);
175+
return new OpenApiInteger(intValue);
176176
}
177177
else
178178
{

test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixture.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ public DefaultSettingsFixture()
1919
// given that there are multiple types that can be used for the declared type OpenApiAny.
2020
// Without this option, properties specific to those types would not be compared.
2121
AssertionOptions.AssertEquivalencyUsing(
22-
o => o.AllowingInfiniteRecursion().RespectingRuntimeTypes());
22+
o => o
23+
.AllowingInfiniteRecursion()
24+
.RespectingRuntimeTypes()
25+
.WithStrictOrdering());
2326
}
2427
}
2528
}

0 commit comments

Comments
 (0)