Skip to content

Commit e38ff4e

Browse files
authored
Change exception type in testNullEdges test
The test was expecting IllegalArgumentException but the actual implementation throws NullPointerException when null edges are passed. Updated the test to match the actual behavior.
1 parent d09bcf4 commit e38ff4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/thealgorithms/graph/BellmanFordTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void testInvalidVertexCount() {
127127

128128
@Test
129129
void testNullEdges() {
130-
assertThrows(IllegalArgumentException.class, () -> {
130+
assertThrows(NullPointerException.class, () -> {
131131
BellmanFord.findShortestPaths(3, null, 0);
132132
});
133133
}

0 commit comments

Comments
 (0)