Skip to content

Commit 6a636fa

Browse files
fix: dynamic test
1 parent 99594c3 commit 6a636fa

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
package de.claudioaltamura.java.junit5;
22

3-
import org.junit.jupiter.api.DynamicTest;
4-
import org.junit.jupiter.api.TestFactory;
5-
6-
import java.util.Arrays;
7-
83
import static org.junit.jupiter.api.Assertions.assertEquals;
94
import static org.junit.jupiter.api.DynamicTest.dynamicTest;
105

11-
class DynamicExampleTest {
6+
import java.util.Arrays;
7+
import org.junit.jupiter.api.DynamicTest;
8+
import org.junit.jupiter.api.TestFactory;
129

10+
class DynamicExampleTest {
1311

14-
@TestFactory
15-
Iterable<DynamicTest> test() {
16-
return Arrays.asList(
17-
dynamicTest("2 * 2", () -> assertEquals(4, 2 * 2)),
18-
dynamicTest("3 * 3", () -> assertEquals(9, 3 * 3))
19-
);
20-
}
12+
@TestFactory
13+
Iterable<DynamicTest> test() {
14+
return Arrays.asList(
15+
dynamicTest("2 * 2", () -> assertEquals(4, 2 * 2)),
16+
dynamicTest("3 * 3", () -> assertEquals(9, 3 * 3)));
17+
}
2118
}

0 commit comments

Comments
 (0)