Skip to content

Commit df68816

Browse files
committed
Change test date value
Using value 01/01/0001 could be represented as 1/1/0001 in a machine using a different regional format, and thus cause the test to fail
1 parent 9746489 commit df68816

3 files changed

+3
-3
lines changed

test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
]
2323
}
2424
],
25-
"aDate": "01/01/0001"
25+
"aDate": "12/12/2022"
2626
}
2727
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"value":{"versions":[{"status":"Status1","id":"v1","links":[{"href":"http://example.com/1","rel":"sampleRel1"}]},{"status":"Status2","id":"v2","links":[{"href":"http://example.com/2","rel":"sampleRel2"}]}],"aDate":"01/01/0001"}}
1+
{"value":{"versions":[{"status":"Status1","id":"v1","links":[{"href":"http://example.com/1","rel":"sampleRel1"}]},{"status":"Status2","id":"v2","links":[{"href":"http://example.com/2","rel":"sampleRel2"}]}],"aDate":"12/12/2022"}}

test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class OpenApiExampleTests
9797
}
9898
}
9999
},
100-
["aDate"] = new OpenApiDate(DateTime.MinValue)
100+
["aDate"] = new OpenApiDate(DateTime.Parse("12/12/2022 00:00:00"))
101101
}
102102
};
103103

0 commit comments

Comments
 (0)