Skip to content

Commit 9e0f4fe

Browse files
committed
Create MathTest
1 parent 18ae320 commit 9e0f4fe

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.mincong.junit5;
2+
3+
import static org.assertj.core.api.Assertions.assertThat;
4+
5+
import org.junit.jupiter.params.ParameterizedTest;
6+
import org.junit.jupiter.params.provider.CsvSource;
7+
8+
public class MathTest {
9+
@ParameterizedTest
10+
@CsvSource({
11+
"1, 2, 2",
12+
"1, -1, 1",
13+
"1, 1, 1",
14+
})
15+
void testMax(int a, int b, int max) {
16+
assertThat(Math.max(a, b)).isEqualTo(max);
17+
}
18+
}

0 commit comments

Comments
 (0)