Skip to content

Commit c8fdc6a

Browse files
committed
Addressed code recommendations
1 parent ebb5486 commit c8fdc6a

4 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/BlazorWebFormsComponents.Test/BulletedList/ClickEvents.razor

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
@code {
55

6-
private int _clickedIndex = -1;
7-
86
[Fact]
97
public async Task BulletedList_LinkButtonClick_InvokesOnClickEvent()
108
{

src/BlazorWebFormsComponents.Test/SiteMapPath/ParentLevels.razor

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
CurrentUrl="/products/electronics/phones/iphone"
3030
ParentLevelsDisplayed="-1" />);
3131

32-
// Assert - Should show all 5 nodes
33-
var allElements = cut.FindAll("a, span > span");
34-
// 4 links + 1 current node span + separator spans
32+
// Assert - Should show all 5 nodes (4 links + 1 current node span + separator spans)
3533
cut.FindAll("a").Count.ShouldBe(4);
3634
}
3735

src/BlazorWebFormsComponents/BulletedList.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace BlazorWebFormsComponents
1616
/// <typeparam name="TItem">The type of items in the data source.</typeparam>
1717
public partial class BulletedList<TItem> : DataBoundComponent<TItem>, IStyle
1818
{
19-
private string _baseId = Guid.NewGuid().ToString("N").Substring(0, 8);
19+
private readonly string _baseId = Guid.NewGuid().ToString("N").Substring(0, 8);
2020

2121
/// <summary>
2222
/// Gets or sets the bullet style of the list.

src/BlazorWebFormsComponents/SiteMapPath.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
{
88
var node = NavigationPath[i];
99
var isFirst = i == 0;
10-
var isLast = i == NavigationPath.Count - 1;
1110
var isCurrent = IsCurrentNode(node);
1211
var isRoot = IsRootNode(node);
1312

0 commit comments

Comments
 (0)