Skip to content

Commit aa9b4e6

Browse files
committed
Fix CS8604 null reference warnings in tests
1 parent bccdf32 commit aa9b4e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Algorithms.Tests/Graph/AStarTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public void FindPathInGrid_WithObstacle_FindsAlternatePath()
200200
path.Should().NotBeNull();
201201
path.Should().NotContain((1, 1)); // Should avoid obstacle
202202
path!.First().Should().Be((0, 0));
203-
path.Last().Should().Be((2, 2));
203+
path!.Last().Should().Be((2, 2));
204204
}
205205

206206
[Test]
@@ -284,7 +284,7 @@ public void FindPathInGrid_ComplexMaze_FindsPath()
284284
// Assert
285285
path.Should().NotBeNull();
286286
path!.First().Should().Be((0, 0));
287-
path.Last().Should().Be((4, 4));
287+
path!.Last().Should().Be((4, 4));
288288
}
289289

290290
[Test]

0 commit comments

Comments
 (0)