Skip to content

Commit e7b1a4b

Browse files
migrate 69 test to use Junit5
1 parent a669a01 commit e7b1a4b

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Diff for: src/test/java/com/fishercoder/_69Test.java

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
package com.fishercoder;
22

33
import com.fishercoder.solutions._69;
4-
import org.junit.BeforeClass;
5-
import org.junit.Test;
4+
import org.junit.jupiter.api.BeforeEach;
5+
import org.junit.jupiter.api.Test;
66

7-
import static junit.framework.Assert.assertEquals;
7+
import static org.junit.jupiter.api.Assertions.assertEquals;
88

99
public class _69Test {
10-
private static _69.Solution1 solution1;
10+
private static _69.Solution1 solution1;
1111

12-
@BeforeClass
13-
public static void setup() {
14-
solution1 = new _69.Solution1();
15-
}
12+
@BeforeEach
13+
public void setup() {
14+
solution1 = new _69.Solution1();
15+
}
1616

17-
@Test
18-
public void test1() {
19-
assertEquals(4, solution1.mySqrt(16));
20-
}
17+
@Test
18+
public void test1() {
19+
assertEquals(4, solution1.mySqrt(16));
20+
}
2121

22-
@Test
23-
public void test2() {
24-
assertEquals(2, solution1.mySqrt(8));
25-
}
22+
@Test
23+
public void test2() {
24+
assertEquals(2, solution1.mySqrt(8));
25+
}
2626
}

0 commit comments

Comments
 (0)