Skip to content

Commit e742469

Browse files
Revert test refactor
Revert change to use `[InlineData]` now that none of the tests are skipped.
1 parent 11c744c commit e742469

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/TodoApp.Tests/OpenApiTests.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ public OpenApiTests(TodoAppFixture fixture, ITestOutputHelper outputHelper)
2323

2424
private ITestOutputHelper OutputHelper { get; }
2525

26+
public static TheoryData<string> OpenApiUrls() => new()
27+
{
28+
{ "/nswag/v1.json" },
29+
{ "/openapi/v1.json" },
30+
{ "/swagger/v1/swagger.json" },
31+
};
32+
2633
[Theory]
27-
[InlineData("/nswag/v1.json")]
28-
[InlineData("/openapi/v1.json")]
29-
[InlineData("/swagger/v1/swagger.json")]
34+
[MemberData(nameof(OpenApiUrls))]
3035
public async Task Schema_Is_Correct(string schemaUrl)
3136
{
3237
// Arrange
@@ -47,9 +52,7 @@ public async Task Schema_Is_Correct(string schemaUrl)
4752
}
4853

4954
[Theory]
50-
[InlineData("/nswag/v1.json")]
51-
[InlineData("/openapi/v1.json")]
52-
[InlineData("/swagger/v1/swagger.json")]
55+
[MemberData(nameof(OpenApiUrls))]
5356
public async Task Schema_Has_No_Validation_Warnings(string schemaUrl)
5457
{
5558
// Arrange

0 commit comments

Comments
 (0)