File tree Expand file tree Collapse file tree
StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ namespace StyleCop.Analyzers.Test.DocumentationRules
2020 [ UseCulture ( "en-US" ) ]
2121 public class SA1642UnitTests : CodeFixVerifier
2222 {
23+ private string settings = null ;
24+
2325 [ Theory ]
2426 [ InlineData ( "class" ) ]
2527 [ InlineData ( "struct" ) ]
@@ -861,6 +863,30 @@ public TestClass() { }
861863 Assert . Empty ( offeredFixes ) ;
862864 }
863865
866+ [ Theory ]
867+ [ InlineData ( "class" ) ]
868+ [ InlineData ( "struct" ) ]
869+ [ WorkItem ( 2236 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2236" ) ]
870+ public async Task TestDocumentationCultureIsUsedAsync ( string typeKind )
871+ {
872+ this . settings = @"
873+ {
874+ ""settings"": {
875+ ""documentationRules"": {
876+ ""documentationCulture"": ""en-GB"",
877+ }
878+ }
879+ }
880+ " ;
881+
882+ await this . TestConstructorCorrectDocumentationSimpleAsync (
883+ typeKind ,
884+ "public" ,
885+ "Initialises a new instance of the " ,
886+ " " + typeKind ,
887+ false ) . ConfigureAwait ( false ) ;
888+ }
889+
864890 protected override Project ApplyCompilationOptions ( Project project )
865891 {
866892 var resolver = new TestXmlReferenceResolver ( ) ;
@@ -942,6 +968,11 @@ protected override CodeFixProvider GetCSharpCodeFixProvider()
942968 return new SA1642SA1643CodeFixProvider ( ) ;
943969 }
944970
971+ protected override string GetSettings ( )
972+ {
973+ return this . settings ;
974+ }
975+
945976 private async Task TestEmptyConstructorAsync ( string typeKind , string modifiers )
946977 {
947978 var testCode = @"namespace FooNamespace
You can’t perform that action at this time.
0 commit comments