@@ -449,6 +449,201 @@ public interface ITest
449449 await this . VerifyCSharpFixAsync ( testCode , fixedTestCode ) . ConfigureAwait ( false ) ;
450450 }
451451
452+ [ Fact ]
453+ public async Task TestMultipleParagraphBlocksAsync ( )
454+ {
455+ var testCode = @"
456+ /// <summary>
457+ /// <para>Paragraph 1</para>
458+ /// <para>Paragraph 2</para>
459+ /// <para>Paragraph 3</para>
460+ /// </summary>
461+ public interface ITest
462+ {
463+ }
464+ " ;
465+
466+ var fixedTestCode = @"
467+ /// <summary>
468+ /// <para>Paragraph 1.</para>
469+ /// <para>Paragraph 2.</para>
470+ /// <para>Paragraph 3.</para>
471+ /// </summary>
472+ public interface ITest
473+ {
474+ }
475+ " ;
476+
477+ DiagnosticResult [ ] expected =
478+ {
479+ this . CSharpDiagnostic ( ) . WithLocation ( 3 , 22 ) ,
480+ this . CSharpDiagnostic ( ) . WithLocation ( 4 , 22 ) ,
481+ this . CSharpDiagnostic ( ) . WithLocation ( 5 , 22 ) ,
482+ } ;
483+
484+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
485+ await this . VerifyCSharpDiagnosticAsync ( fixedTestCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
486+ await this . VerifyCSharpFixAsync ( testCode , fixedTestCode ) . ConfigureAwait ( false ) ;
487+ }
488+
489+ [ Fact ]
490+ public async Task TestMultipleParagraphInlinesAsync ( )
491+ {
492+ var testCode = @"
493+ /// <summary>
494+ /// Paragraph 1
495+ /// <para/>
496+ /// Paragraph 2
497+ /// <para/>
498+ /// Paragraph 3
499+ /// </summary>
500+ public interface ITest
501+ {
502+ }
503+ " ;
504+
505+ var fixedTestCode = @"
506+ /// <summary>
507+ /// Paragraph 1.
508+ /// <para/>
509+ /// Paragraph 2.
510+ /// <para/>
511+ /// Paragraph 3.
512+ /// </summary>
513+ public interface ITest
514+ {
515+ }
516+ " ;
517+
518+ DiagnosticResult [ ] expected =
519+ {
520+ this . CSharpDiagnostic ( ) . WithLocation ( 3 , 16 ) ,
521+ this . CSharpDiagnostic ( ) . WithLocation ( 5 , 16 ) ,
522+ this . CSharpDiagnostic ( ) . WithLocation ( 7 , 16 ) ,
523+ } ;
524+
525+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
526+ await this . VerifyCSharpDiagnosticAsync ( fixedTestCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
527+ await this . VerifyCSharpFixAsync ( testCode , fixedTestCode ) . ConfigureAwait ( false ) ;
528+ }
529+
530+ [ Fact ]
531+ public async Task TestMultipleParagraphBlocksAfterFirstAsync ( )
532+ {
533+ var testCode = @"
534+ /// <summary>
535+ /// Paragraph 1
536+ /// <para>Paragraph 2</para>
537+ /// <para>Paragraph 3</para>
538+ /// </summary>
539+ public interface ITest
540+ {
541+ }
542+ " ;
543+
544+ var fixedTestCode = @"
545+ /// <summary>
546+ /// Paragraph 1.
547+ /// <para>Paragraph 2.</para>
548+ /// <para>Paragraph 3.</para>
549+ /// </summary>
550+ public interface ITest
551+ {
552+ }
553+ " ;
554+
555+ DiagnosticResult [ ] expected =
556+ {
557+ this . CSharpDiagnostic ( ) . WithLocation ( 3 , 16 ) ,
558+ this . CSharpDiagnostic ( ) . WithLocation ( 4 , 22 ) ,
559+ this . CSharpDiagnostic ( ) . WithLocation ( 5 , 22 ) ,
560+ } ;
561+
562+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
563+ await this . VerifyCSharpDiagnosticAsync ( fixedTestCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
564+ await this . VerifyCSharpFixAsync ( testCode , fixedTestCode ) . ConfigureAwait ( false ) ;
565+ }
566+
567+ [ Fact ]
568+ public async Task TestMultipleParagraphBlocksAfterFirstInNoteAsync ( )
569+ {
570+ var testCode = @"
571+ /// <summary>
572+ /// Paragraph 0
573+ /// <note>
574+ /// Paragraph 1
575+ /// <para>Paragraph 2</para>
576+ /// <para>Paragraph 3</para>
577+ /// </note>
578+ /// </summary>
579+ public interface ITest
580+ {
581+ }
582+ " ;
583+
584+ var fixedTestCode = @"
585+ /// <summary>
586+ /// Paragraph 0.
587+ /// <note>
588+ /// Paragraph 1.
589+ /// <para>Paragraph 2.</para>
590+ /// <para>Paragraph 3.</para>
591+ /// </note>
592+ /// </summary>
593+ public interface ITest
594+ {
595+ }
596+ " ;
597+
598+ DiagnosticResult [ ] expected =
599+ {
600+ this . CSharpDiagnostic ( ) . WithLocation ( 3 , 16 ) ,
601+ this . CSharpDiagnostic ( ) . WithLocation ( 5 , 16 ) ,
602+ this . CSharpDiagnostic ( ) . WithLocation ( 6 , 22 ) ,
603+ this . CSharpDiagnostic ( ) . WithLocation ( 7 , 22 ) ,
604+ } ;
605+
606+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
607+ await this . VerifyCSharpDiagnosticAsync ( fixedTestCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
608+ await this . VerifyCSharpFixAsync ( testCode , fixedTestCode ) . ConfigureAwait ( false ) ;
609+ }
610+
611+ [ Fact ]
612+ public async Task TestCodeBetweenParagraphBlocksAsync ( )
613+ {
614+ var testCode = @"
615+ /// <summary>
616+ /// Paragraph 1
617+ /// <code>Code block</code>
618+ /// <para>Paragraph 2</para>
619+ /// </summary>
620+ public interface ITest
621+ {
622+ }
623+ " ;
624+
625+ var fixedTestCode = @"
626+ /// <summary>
627+ /// Paragraph 1.
628+ /// <code>Code block</code>
629+ /// <para>Paragraph 2.</para>
630+ /// </summary>
631+ public interface ITest
632+ {
633+ }
634+ " ;
635+
636+ DiagnosticResult [ ] expected =
637+ {
638+ this . CSharpDiagnostic ( ) . WithLocation ( 3 , 16 ) ,
639+ this . CSharpDiagnostic ( ) . WithLocation ( 5 , 22 ) ,
640+ } ;
641+
642+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
643+ await this . VerifyCSharpDiagnosticAsync ( fixedTestCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
644+ await this . VerifyCSharpFixAsync ( testCode , fixedTestCode ) . ConfigureAwait ( false ) ;
645+ }
646+
452647 protected override Project ApplyCompilationOptions ( Project project )
453648 {
454649 var resolver = new TestXmlReferenceResolver ( ) ;
0 commit comments