This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
test/GitHub.InlineReviews.UnitTests/Tags Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,6 @@ public void ShouldReturnShowInlineTagForComment()
255255 Assert . That ( result [ 0 ] . Tag , Is . InstanceOf < ShowInlineTag > ( ) ) ;
256256 }
257257
258-
259258 [ Test ]
260259 public void ShouldReturnShowInlineTagForAnnotation ( )
261260 {
@@ -274,6 +273,24 @@ public void ShouldReturnShowInlineTagForAnnotation()
274273 Assert . That ( result [ 0 ] . Tag , Is . InstanceOf < ShowInlineTag > ( ) ) ;
275274 }
276275
276+ [ Test ]
277+ public void ShouldReturnShowOneInlineTagForCommentAndAnnotation ( )
278+ {
279+ var file = CreateSessionFile ( true , true ) ;
280+ var target = new InlineTagger (
281+ Substitute . For < ITextView > ( ) ,
282+ Substitute . For < ITextBuffer > ( ) ,
283+ CreateSessionManager ( file ) ) ;
284+
285+ // Line 10 has an existing RHS comment.
286+ var span = CreateSpan ( 10 ) ;
287+ var firstPass = target . GetTags ( span ) ;
288+ var result = target . GetTags ( span ) . ToList ( ) ;
289+
290+ Assert . That ( result . Count , Is . EqualTo ( 2 ) ) ;
291+ Assert . That ( result [ 0 ] . Tag , Is . InstanceOf < ShowInlineTag > ( ) ) ;
292+ }
293+
277294 [ Test ]
278295 public void ShouldReturnAddNewCommentTagForAddedLine ( )
279296 {
You can’t perform that action at this time.
0 commit comments