Skip to content

Commit 495a08c

Browse files
committed
Consolidate tests
1 parent 03e0562 commit 495a08c

File tree

1 file changed

+2
-37
lines changed

1 file changed

+2
-37
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1648UnitTests.cs

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -311,49 +311,14 @@ public void TestMethod() { }
311311
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
312312
[Fact]
313313
[WorkItem(3291, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3291")]
314-
[WorkItem(3291, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3291")]
315-
public async Task TestIncorrectDocumentedDelegateInheritDocAsync()
316-
{
317-
var testCode = @"
318-
/// <summary>Foo</summary>
319-
/// <param name=""value"">some param</param>
320-
/// <returns>something</returns>
321-
public delegate bool TestDelegate(int value);
322-
323-
/// <summary>Test class</summary>
324-
public class TestClass
325-
{
326-
/// {|#0:<include file='DelegateInheritDoc.xml' path='/TestDelegate/*'/>|}
327-
public delegate bool TestDelegate(int value);
328-
}
329-
";
330-
331-
var expected = Diagnostic().WithLocation(0);
332-
await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
333-
}
334-
335-
/// <summary>
336-
/// Verifies that a delegate declaration that includes the inheritdoc will produce diagnostics.
337-
/// </summary>
338-
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
339-
[Fact]
340-
[WorkItem(3291, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3291")]
341-
[WorkItem(3291, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3291")]
342314
public async Task TestIncorrectDelegateInheritDocAsync()
343315
{
344316
var testCode = @"
317+
/// [|<include file='DelegateInheritDoc.xml' path='/TestDelegate/*'/>|]
345318
public delegate bool TestDelegate(int value);
346-
347-
/// <summary>Test class</summary>
348-
public class TestClass
349-
{
350-
/// {|#0:<include file='DelegateInheritDoc.xml' path='/TestDelegate/*'/>|}
351-
public delegate bool TestDelegate(int value);
352-
}
353319
";
354320

355-
var expected = Diagnostic().WithLocation(0);
356-
await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
321+
await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
357322
}
358323

359324
private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken)

0 commit comments

Comments
 (0)