Skip to content

Commit 487935c

Browse files
Improve coverage for SA1300 by changing a test to verify a property (instead of a field) in a native methods class, since this analyzer does not handle fields
1 parent 2406656 commit 487935c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1300CSharp10UnitTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public async Task TestAllowedLowerCaseFileScopedNamespaceIsNotReportedAsync()
5858
}
5959

6060
[Fact]
61-
public async Task TestLowerCaseComlicatedFileScopedNamespaceAsync()
61+
public async Task TestLowerCaseComplicatedFileScopedNamespaceAsync()
6262
{
6363
var testCode = @"namespace {|#0:test|}.{|#1:foo|}.{|#2:bar|};";
6464

StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1300UnitTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public async Task TestAllowedLowerCaseNamespaceIsNotReportedAsync()
7171
}
7272

7373
[Fact]
74-
public async Task TestLowerCaseComlicatedNamespaceAsync()
74+
public async Task TestLowerCaseComplicatedNamespaceAsync()
7575
{
7676
var testCode = @"namespace test.foo.bar
7777
{
@@ -789,7 +789,7 @@ public async Task TestNativeMethodsExceptionAsync()
789789
{
790790
var testCode = @"public class TestNativeMethods
791791
{
792-
public string test;
792+
public string test { get; set; }
793793
}";
794794

795795
await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);

0 commit comments

Comments
 (0)