Skip to content

Commit 4127f48

Browse files
committed
issue #3067 is not reproduced
1 parent 59adc83 commit 4127f48

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,42 @@
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+
/// <summary>
18+
/// Verifies that method-like declarations with invalid documentation will produce the expected diagnostics.
19+
/// </summary>
20+
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
21+
[Fact]
22+
public async Task TestValidPropertyDeclarationAsync()
23+
{
24+
var testCode = @"namespace TestNamespace
25+
{
26+
public class TestClass
27+
{
28+
/// <summary>
29+
/// Gets or sets the value.
30+
/// </summary>
31+
public string SomeString { get; set; } = null!;
32+
33+
/// <summary>
34+
/// Gets or sets the value.
35+
/// </summary>
36+
public string AnotherString { get; set; } = null!;
37+
}
38+
}
39+
";
40+
41+
await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
42+
}
1043
}
1144
}

0 commit comments

Comments
 (0)