Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check file name for single 'enum' and 'delegate' top-level types #3269

Merged
merged 3 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,88 +3,9 @@

namespace StyleCop.Analyzers.Test.CSharp9.DocumentationRules
{
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CSharp;
using StyleCop.Analyzers.Test.CSharp8.DocumentationRules;
using Xunit;

public class SA1649CSharp9UnitTests : SA1649CSharp8UnitTests
{
public static IEnumerable<object[]> CSharp9TypeKeywords
{
get
{
foreach (var keyword in TypeKeywords)
{
yield return keyword;
}

yield return new object[] { "record", LanguageVersion.CSharp9 };
}
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyWrongFileNameAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyWrongFileNameAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyWrongFileNameMultipleExtensionsAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyWrongFileNameMultipleExtensionsAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyWrongFileNameNoExtensionAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyWrongFileNameNoExtensionAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyCaseInsensitivityAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyCaseInsensitivityAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyFirstTypeIsUsedAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyFirstTypeIsUsedAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyThatPartialTypesAreIgnoredAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyThatPartialTypesAreIgnoredAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyStyleCopNamingConventionForGenericTypeAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyStyleCopNamingConventionForGenericTypeAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyMetadataNamingConventionForGenericTypeAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyMetadataNamingConventionForGenericTypeAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}

[Theory]
[MemberData(nameof(CSharp9TypeKeywords))]
public override async Task VerifyMetadataNamingConventionForGenericTypeMultipleExtensionsAsync(string typeKeyword, LanguageVersion languageVersion)
{
await base.VerifyMetadataNamingConventionForGenericTypeMultipleExtensionsAsync(typeKeyword, languageVersion).ConfigureAwait(false);
}
}
}
Loading