-
Notifications
You must be signed in to change notification settings - Fork 133
Expand file tree
/
Copy pathTestRomanNumerals.java
More file actions
99 lines (79 loc) · 1.94 KB
/
Copy pathTestRomanNumerals.java
File metadata and controls
99 lines (79 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import static org.junit.Assert.*;
import org.junit.Test;
public class TestRomanNumerals {
@Test
public void test_I_1() {
int romanNum = RomanNumerals.convertToInteger("I");
assertEquals(1, romanNum);
}
@Test
public void test_V_5() {
int romanNum = RomanNumerals.convertToInteger("V");
assertEquals(5, romanNum);
}
@Test
public void test_X_10() {
int romanNum = RomanNumerals.convertToInteger("X");
assertEquals(10, romanNum);
}
@Test
public void test_L_50() {
int romanNum = RomanNumerals.convertToInteger("L");
assertEquals(50, romanNum);
}
@Test
public void test_C_100() {
int romanNum = RomanNumerals.convertToInteger("C");
assertEquals(100, romanNum);
}
@Test
public void test_D_500() {
int romanNum = RomanNumerals.convertToInteger("D");
assertEquals(500, romanNum);
}
@Test
public void test_M_1000() {
int romanNum = RomanNumerals.convertToInteger("M");
assertEquals(1000, romanNum);
}
@Test
public void test_RepeatLessThanThreeTimesI(){
String numI = ("XIII");
assertTrue(RomanNumerals.repeatLessThanThreeTimesI(numI));
}
@Test
public void test_RepeatLessThanThreeTimesX(){
String numX = ("XX");
assertTrue(RomanNumerals.repeatLessThanThreeTimesX(numX));
}
@Test
public void test_RepeatLessThanThreeTimesC(){
String numC = ("C");
assertTrue(RomanNumerals.repeatLessThanThreeTimesC(numC));
}
@Test
public void test_RepeatLessThanThreeTimesM(){
String numM = ("M");
assertTrue(RomanNumerals.repeatLessThanThreeTimesM(numM));
}
@Test
public void test_neverRepeatV(){
String numV = ("V");
assertTrue(RomanNumerals.neverRepeatV(numV));
}
@Test
public void test_neverRepeatL(){
String numL = ("L");
assertTrue(RomanNumerals.neverRepeatL(numL));
}
@Test
public void test_neverRepeatD(){
String numD = ("D");
assertTrue(RomanNumerals.neverRepeatD(numD));
}
@Test
public void test_substracted(){
String oneSymbol = ("CD");
assertEquals("CW", oneSymbol);
}
}