Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 5174ee3

Browse files
Adding another test
1 parent b39c5a4 commit 5174ee3

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

test/GitHub.InlineReviews.UnitTests/Tags/InlineTaggerTests.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff 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
{

0 commit comments

Comments
 (0)