-
Notifications
You must be signed in to change notification settings - Fork 133
Expand file tree
/
Copy pathTestRomanNumerals.java
More file actions
94 lines (73 loc) · 1.9 KB
/
Copy pathTestRomanNumerals.java
File metadata and controls
94 lines (73 loc) · 1.9 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
import static org.junit.Assert.*;
import org.junit.Test;
public class TestRomanNumerals {
RomanNumerals rn = new RomanNumerals();
@Test
public void test_RomanNumerals_notNull() {
assertNotNull(rn);
}
@Test
public void test_RomanNumerals_return_one() {
assertEquals(1, rn.convertToInteger("i"));
}
@Test
public void test_RomanNumerals_return_two() {
assertEquals(2, rn.convertToInteger("ii"));
}
@Test
public void test_RomanNumerals_return_three() {
assertEquals(3, rn.convertToInteger("iii"));
}
@Test
public void test_RomanNumerals_return_four() {
assertEquals(4, rn.convertToInteger("iv"));
}
@Test
public void test_RomanNumerals_return_five() {
assertEquals(5, rn.convertToInteger("v"));
}
@Test
public void test_RomanNumerals_return_six() {
assertEquals(6, rn.convertToInteger("vi"));
}
@Test
public void test_RomanNumerals_return_seven() {
assertEquals(7, rn.convertToInteger("vii"));
}
@Test
public void test_RomanNumerals_return_eight() {
assertEquals(8, rn.convertToInteger("viii"));
}
@Test
public void test_RomanNumerals_return_nine() {
assertEquals(9, rn.convertToInteger("ix"));
}
@Test
public void test_RomanNumerals_return_ten() {
assertEquals(10, rn.convertToInteger("x"));
}
@Test
public void test_RomanNumerals_return_nineteen() {
assertEquals(19, rn.convertToInteger("ixx"));
}
@Test
public void test_RomanNumerals_return_twenty() {
assertEquals(20, rn.convertToInteger("xx"));
}
@Test
public void test_RomanNumerals_return_ninetyNine() {
assertEquals(99, rn.convertToInteger("XCIX"));
}
@Test
public void test_RomanNumerals_return_999() {
assertEquals(999, rn.convertToInteger("CMXCIX"));
}
@Test
public void test_RomanNumerals_return_1984() {
assertEquals(1984, rn.convertToInteger("mcmlxxxiv"));
}
@Test
public void test_RomanNumerals_return_2014() {
assertEquals(2014, rn.convertToInteger("mmxiv"));
}
}