Skip to content

Commit

Permalink
Generalize tests for SA1600 concerning partial types
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornhellander committed Dec 19, 2023
1 parent ce89120 commit fbeef56
Showing 1 changed file with 6 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,13 @@ public async Task TestBaseTypeWithDocumentationAsync(string type)
await this.TestTypeWithDocumentationAsync(type).ConfigureAwait(false);
}

[Fact]
public async Task TestPartialClassWithoutDocumentationAsync()
{
await this.TestTypeDeclarationDocumentationAsync("class", "partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync("class", "internal partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync("class", "public partial", false, false).ConfigureAwait(false);
}

[Fact]
public async Task TestPartialStructWithoutDocumentationAsync()
{
await this.TestTypeDeclarationDocumentationAsync("struct", "partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync("struct", "internal partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync("struct", "public partial", false, false).ConfigureAwait(false);
}

[Fact]
public async Task TestPartialInterfaceWithoutDocumentationAsync()
[Theory]
[MemberData(nameof(CommonMemberData.TypeDeclarationKeywords), MemberType = typeof(CommonMemberData))]
public async Task TestPartialTypeWithoutDocumentationAsync(string type)
{
await this.TestTypeDeclarationDocumentationAsync("interface", "partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync("interface", "internal partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync("interface", "public partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync(type, "partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync(type, "internal partial", false, false).ConfigureAwait(false);
await this.TestTypeDeclarationDocumentationAsync(type, "public partial", false, false).ConfigureAwait(false);
}

[Fact]
Expand Down

0 comments on commit fbeef56

Please sign in to comment.