Skip to content

Commit 6e8bc11

Browse files
Remove null test
1 parent 84597df commit 6e8bc11

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/test/java/com/thealgorithms/dynamicprogramming/EditDistanceTest.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,6 @@ void testMinDistance(String str1, String str2, int expected) {
1616
assertEquals(expected, EditDistance.minDistance(str1, str2));
1717
}
1818

19-
@Test
20-
void testEditDistanceStringNull() {
21-
assertThrows(NullPointerException.class, () -> { EditDistance.editDistance(null, "abc"); });
22-
assertThrows(NullPointerException.class, () -> { EditDistance.editDistance("abc", null); });
23-
assertThrows(NullPointerException.class, () -> { EditDistance.editDistance(null, null); });
24-
}
25-
26-
@Test
27-
void testEditDistanceStringEmpty() {
28-
int expected = 0;
29-
assertEquals(0, EditDistance.editDistance("", ""));
30-
String s1 = "abc";
31-
expected = s1.length();
32-
assertEquals(expected, EditDistance.editDistance(s1, ""));
33-
String s2 = "aa";
34-
expected = s2.length();
35-
assertEquals(expected, EditDistance.editDistance("", s2));
36-
}
37-
38-
@Test
39-
void testEditDistanceNullValue() {
40-
assertThrows(NullPointerException.class, () -> { EditDistance.editDistance(null, "hello"); });
41-
assertThrows(NullPointerException.class, () -> { EditDistance.editDistance("hello", null); });
42-
assertThrows(NullPointerException.class, () -> { EditDistance.editDistance(null, null); });
43-
}
44-
4519
@Test
4620
public void testEditDistanceBothEmptyStrings() {
4721
assertEquals(0, EditDistance.editDistance("", ""));

0 commit comments

Comments
 (0)