|
9 | 9 | import org.junit.jupiter.params.provider.CsvSource; |
10 | 10 |
|
11 | 11 | class RomanNumeralUtilTest { |
12 | | - @ParameterizedTest() |
13 | | - @CsvSource({"2000,MM", "1,I", "2,II", "1003,MIII", "1004,MIV"}) |
14 | | - void minimumMaximumTest(int testInt, String word) { |
15 | | - System.out.println(word + ": " + testInt); |
16 | | - assertEquals(RomanNumeralUtil.generate(testInt), word); |
17 | | - } |
| 12 | + @ParameterizedTest() |
| 13 | + @CsvSource({"2000,MM", "1,I", "2,II", "1003,MIII", "1004,MIV"}) |
| 14 | + void minimumMaximumTest(int testInt, String word) { |
| 15 | + System.out.println(word + ": " + testInt); |
| 16 | + assertEquals(RomanNumeralUtil.generate(testInt), word); |
| 17 | + } |
18 | 18 |
|
19 | | - @Test |
20 | | - void calcSomeNumerals() { |
21 | | - assertThrows(IllegalArgumentException.class, () -> RomanNumeralUtil.generate(0)); |
22 | | - assertThrows(IllegalArgumentException.class, () -> RomanNumeralUtil.generate(6000)); |
23 | | - } |
| 19 | + @Test |
| 20 | + void calcSomeNumerals() { |
| 21 | + assertThrows(IllegalArgumentException.class, () -> RomanNumeralUtil.generate(0)); |
| 22 | + assertThrows(IllegalArgumentException.class, () -> RomanNumeralUtil.generate(6000)); |
| 23 | + } |
24 | 24 |
|
25 | | - @Test |
26 | | - void shouldNotThrowOnBounds() { |
27 | | - int min = 1; |
28 | | - int max = 5999; |
| 25 | + @Test |
| 26 | + void shouldNotThrowOnBounds() { |
| 27 | + int min = 1; |
| 28 | + int max = 5999; |
29 | 29 |
|
30 | | - assertDoesNotThrow(() -> RomanNumeralUtil.generate(min), "Should not throw exception on " + min); |
31 | | - assertDoesNotThrow(() -> RomanNumeralUtil.generate(max), "Should not throw exception on " + max); |
32 | | - } |
| 30 | + assertDoesNotThrow(() -> RomanNumeralUtil.generate(min), "Should not throw exception on " + min); |
| 31 | + assertDoesNotThrow(() -> RomanNumeralUtil.generate(max), "Should not throw exception on " + max); |
| 32 | + } |
33 | 33 | } |
0 commit comments