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

Commit 35f80ec

Browse files
Fixes for code analysis
1 parent b5dc961 commit 35f80ec

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/GitHub.InlineReviews/Tags/ShowInlineCommentTag.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using GitHub.Extensions;
34
using GitHub.Models;
45
using GitHub.Services;
@@ -27,8 +28,8 @@ public ShowInlineCommentTag(IPullRequestSession session, int lineNumber, DiffCha
2728
public IInlineCommentThreadModel Thread { get; set; }
2829

2930
/// <summary>
30-
/// Gets an array of models holding details of the annotations at the tagged line.
31+
/// Gets a list of models holding details of the annotations at the tagged line.
3132
/// </summary>
32-
public IInlineAnnotationModel[] Annotations { get; set; }
33+
public IReadOnlyList<IInlineAnnotationModel> Annotations { get; set; }
3334
}
3435
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public void ShouldReturnShowInlineTagForAnnotation()
279279
Assert.That(showInlineTag, Is.Not.Null);
280280
Assert.That(showInlineTag.Thread, Is.Null);
281281
Assert.That(showInlineTag.Annotations, Is.Not.Null);
282-
Assert.That(showInlineTag.Annotations.Length, Is.EqualTo(1));
282+
Assert.That(showInlineTag.Annotations.Count, Is.EqualTo(1));
283283
}
284284

285285
[Test]
@@ -302,7 +302,7 @@ public void ShouldReturnShowInlineTagForTwoAnnotations()
302302
Assert.That(showInlineTag, Is.Not.Null);
303303
Assert.That(showInlineTag.Thread, Is.Null);
304304
Assert.That(showInlineTag.Annotations, Is.Not.Null);
305-
Assert.That(showInlineTag.Annotations.Length, Is.EqualTo(2));
305+
Assert.That(showInlineTag.Annotations.Count, Is.EqualTo(2));
306306
}
307307

308308
[Test]
@@ -325,7 +325,7 @@ public void ShouldReturnShowOneInlineTagForCommentAndAnnotation()
325325
Assert.That(showInlineTag, Is.Not.Null);
326326
Assert.That(showInlineTag.Thread, Is.Not.Null);
327327
Assert.That(showInlineTag.Annotations, Is.Not.Null);
328-
Assert.That(showInlineTag.Annotations.Length, Is.EqualTo(1));
328+
Assert.That(showInlineTag.Annotations.Count, Is.EqualTo(1));
329329
}
330330

331331
[Test]

0 commit comments

Comments
 (0)