Skip to content

Commit

Permalink
Add tests for fields with documentInternalElements disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Sep 9, 2018
1 parent a5a4d17 commit 5712cf8
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,24 @@ public async Task TestFieldWithoutDocumentationAsync()
await this.TestFieldDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("public", true, false).ConfigureAwait(false);

// Re-test with the 'documentInternalElements' setting disabled (does impact fields)
this.currentTestSettings = @"
{
""settings"": {
""documentationRules"": {
""documentInternalElements"": false
}
}
}
";

await this.TestFieldDeclarationDocumentationAsync(string.Empty, false, false).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("private", false, false).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("protected", true, false).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("internal", false, false).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("public", true, false).ConfigureAwait(false);

// Re-test with the 'documentPrivateFields' setting enabled (does impact fields)
this.currentTestSettings = @"
{
Expand Down Expand Up @@ -257,6 +275,24 @@ public async Task TestFieldWithDocumentationAsync()
await this.TestFieldDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("public", false, true).ConfigureAwait(false);

// Re-test with the 'documentInternalElements' setting disabled (does impact fields)
this.currentTestSettings = @"
{
""settings"": {
""documentationRules"": {
""documentInternalElements"": false
}
}
}
";

await this.TestFieldDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("private", false, true).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("protected", false, true).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(false);
await this.TestFieldDeclarationDocumentationAsync("public", false, true).ConfigureAwait(false);

// Re-test with the 'documentPrivateFields' setting enabled (does impact fields)
this.currentTestSettings = @"
{
Expand Down

0 comments on commit 5712cf8

Please sign in to comment.