Skip to content

Commit 3eb25f5

Browse files
author
Joel W Kall
committed
changed test cases to test the range of values in int, long, float and double. also renamed Interger to Integer
1 parent 0dff838 commit 3eb25f5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterAnyExtensionsTests.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ public void WriteOpenApiNullAsJsonWorks()
2525
}
2626

2727
[Theory]
28-
[InlineData(-100)]
29-
[InlineData(0)]
28+
[InlineData(int.MinValue)]
3029
[InlineData(42)]
31-
public void WriteOpenApiIntergerAsJsonWorks(int input)
30+
[InlineData(int.MaxValue)]
31+
public void WriteOpenApiIntegerAsJsonWorks(int input)
3232
{
3333
// Arrange
3434
var intValue = new OpenApiInteger(input);
@@ -40,8 +40,8 @@ public void WriteOpenApiIntergerAsJsonWorks(int input)
4040
}
4141

4242
[Theory]
43-
[InlineData(-100)]
44-
[InlineData(0)]
43+
[InlineData(long.MinValue)]
44+
[InlineData(42)]
4545
[InlineData(long.MaxValue)]
4646
public void WriteOpenApiLongAsJsonWorks(long input)
4747
{
@@ -55,9 +55,9 @@ public void WriteOpenApiLongAsJsonWorks(long input)
5555
}
5656

5757
[Theory]
58-
[InlineData(-100.1)]
59-
[InlineData(0.0)]
60-
[InlineData(42.42)]
58+
[InlineData(float.MinValue)]
59+
[InlineData(42)]
60+
[InlineData(float.MaxValue)]
6161
public void WriteOpenApiFloatAsJsonWorks(float input)
6262
{
6363
// Arrange
@@ -70,9 +70,9 @@ public void WriteOpenApiFloatAsJsonWorks(float input)
7070
}
7171

7272
[Theory]
73-
[InlineData(-100.1)]
74-
[InlineData(0.0)]
75-
[InlineData(42.42)]
73+
[InlineData(double.MinValue)]
74+
[InlineData(42)]
75+
[InlineData(double.MaxValue)]
7676
public void WriteOpenApiDoubleAsJsonWorks(double input)
7777
{
7878
// Arrange

0 commit comments

Comments
 (0)