8000 migrate 82 to junit5 · githubniraj/Leetcode@bd80c26 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd80c26

Browse files
migrate 82 to junit5
1 parent 195a870 commit bd80c26

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/test/java/com/fishercoder/_82Test.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,33 @@
33
import com.fishercoder.common.classes.ListNode;
44
import com.fishercoder.common.utils.LinkedListUtils;
55
import com.fishercoder.solutions._82;
6-
import org.junit.Assert;
7-
import org.junit.BeforeClass;
8-
import org.junit.Test;
6+
import org.junit.jupiter.api.BeforeEach;
7+
import org.junit.jupiter.api.Test;
8+
9+
import static org.junit.jupiter.api.Assertions.assertEquals;
910

1011
public class _82Test {
1112

1213
private static _82.Solution1 solution1;
1314
private static ListNode head;
1415
private static ListNode expected;
1516

16-
@BeforeClass
17-
public static void setup() {
17+
@BeforeEach
18+
public void setup() {
1819
solution1 = new _82.Solution1();
1920
}
2021

2122
@Test
2223
public void test1() {
2324
head = LinkedListUtils.contructLinkedList(new int[]{1, 2, 3, 3, 4, 4, 5});
2425
expected = LinkedListUtils.contructLinkedList(new int[]{1, 2, 5});
25-
Assert.assertEquals(expected, solution1.deleteDuplicates(head));
26+
assertEquals(expected, solution1.deleteDuplicates(head));
2627
}
2728

2829
@Test
2930
public void test2() {
3031
head = LinkedListUtils.contructLinkedList(new int[]{1, 1, 1, 2, 3});
3132
expected = LinkedListUtils.contructLinkedList(new int[]{2, 3});
32-
Assert.assertEquals(expected, solution1.deleteDuplicates(head));
33+
assertEquals(expected, solution1.deleteDuplicates(head));
3334
}
3435
}

0 commit comments

Comments
 (0)
0