Skip to content

Commit d4ee8ba

Browse files
committed
Refactor assert to assertTrue and assertFalse
1 parent da0db8a commit d4ee8ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/java/com/thealgorithms/backtracking/MColoringTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.thealgorithms.backtracking;
22

33
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
import static org.junit.jupiter.api.Assertions.assertFalse;
5+
import static org.junit.jupiter.api.Assertions.assertTrue;
46

57
import java.util.ArrayList;
68
import org.junit.jupiter.api.Test;
@@ -16,7 +18,7 @@ void testGraphColoring1() {
1618
int[][] graph = {{0, 1, 1, 1}, {1, 0, 1, 0}, {1, 1, 0, 1}, {1, 0, 1, 0}};
1719
int m = 3; // Number of colors
1820

19-
assertEquals(true, MColoring.isColoringPossible(createGraph(graph), n, m));
21+
assertTrue(MColoring.isColoringPossible(createGraph(graph), n, m));
2022
}
2123

2224
@Test
@@ -25,7 +27,7 @@ void testGraphColoring2() {
2527
int[][] graph = {{0, 1, 1, 1, 0}, {1, 0, 0, 1, 0}, {1, 0, 0, 1, 1}, {1, 1, 1, 0, 1}, {0, 0, 1, 1, 0}};
2628
int m = 2; // Number of colors
2729

28-
assertEquals(false, MColoring.isColoringPossible(createGraph(graph), n, m));
30+
assertFalse(MColoring.isColoringPossible(createGraph(graph), n, m));
2931
}
3032

3133
@Test
@@ -34,7 +36,7 @@ void testGraphColoring3() {
3436
int[][] graph = {{0, 1, 1}, {1, 0, 1}, {1, 1, 0}};
3537
int m = 2; // Number of colors
3638

37-
assertEquals(false, MColoring.isColoringPossible(createGraph(graph), n, m));
39+
assertFalse(MColoring.isColoringPossible(createGraph(graph), n, m));
3840
}
3941

4042
private ArrayList<Node> createGraph(int[][] graph) {

0 commit comments

Comments
 (0)