Skip to content

Commit 3d0c548

Browse files
authored
Merge pull request #3069 from pantosha/master
issue #3067 is not reproduced
2 parents 34c2672 + f07cae7 commit 3d0c548

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1514CSharp8UnitTests.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,39 @@
33

44
namespace StyleCop.Analyzers.Test.CSharp8.LayoutRules
55
{
6+
using System.Threading;
7+
using System.Threading.Tasks;
8+
using Microsoft.CodeAnalysis.Testing;
69
using StyleCop.Analyzers.Test.CSharp7.LayoutRules;
10+
using Xunit;
11+
using static StyleCop.Analyzers.Test.Verifiers.StyleCopCodeFixVerifier<
12+
StyleCop.Analyzers.LayoutRules.SA1514ElementDocumentationHeaderMustBePrecededByBlankLine,
13+
StyleCop.Analyzers.LayoutRules.SA1514CodeFixProvider>;
714

815
public class SA1514CSharp8UnitTests : SA1514CSharp7UnitTests
916
{
17+
[Fact]
18+
[WorkItem(3067, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3067")]
19+
public async Task TestValidPropertyDeclarationAsync()
20+
{
21+
var testCode = @"namespace TestNamespace
22+
{
23+
public class TestClass
24+
{
25+
/// <summary>
26+
/// Gets or sets the value.
27+
/// </summary>
28+
public string SomeString { get; set; } = null!;
29+
30+
/// <summary>
31+
/// Gets or sets the value.
32+
/// </summary>
33+
public string AnotherString { get; set; } = null!;
34+
}
35+
}
36+
";
37+
38+
await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
39+
}
1040
}
1141
}

0 commit comments

Comments
 (0)