Repository navigation
Expand file tree
/
Copy pathSayTest.java
More file actions
99 lines (81 loc) · 2.5 KB
/
Copy pathSayTest.java
File metadata and controls
99 lines (81 loc) · 2.5 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 org.junit.Test;
import org.junit.Ignore;
import static org.junit.Assert.assertEquals;
public class SayTest {
private Say say = new Say();
@Test
public void zero() {
assertEquals("zero", say.say(0));
}
@Ignore("Remove to run test")
@Test
public void one() {
assertEquals("one", say.say(1));
}
@Ignore("Remove to run test")
@Test
public void fourteen() {
assertEquals("fourteen", say.say(14));
}
@Ignore("Remove to run test")
@Test
public void twenty() {
assertEquals("twenty", say.say(20));
}
@Ignore("Remove to run test")
@Test
public void twentyTwo() {
assertEquals("twenty-two", say.say(22));
}
@Ignore("Remove to run test")
@Test
public void oneHundred() {
assertEquals("one hundred", say.say(100));
}
@Ignore("Remove to run test")
@Test
public void oneHundredTwentyThree() {
assertEquals("one hundred twenty-three", say.say(123));
}
@Ignore("Remove to run test")
@Test
public void oneThousand() {
assertEquals("one thousand", say.say(1_000));
}
@Ignore("Remove to run test")
@Test
public void oneThousandTwoHundredThirtyFour() {
assertEquals("one thousand two hundred thirty-four", say.say(1_234));
}
@Ignore("Remove to run test")
@Test
public void oneMillion() {
assertEquals("one million", say.say(1_000_000));
}
@Ignore("Remove to run test")
@Test
public void oneMillionTwoThousandThreeHundredFortyFive() {
assertEquals("one million two thousand three hundred forty-five", say.say(1_002_345));
}
@Ignore("Remove to run test")
@Test
public void oneBillion() {
assertEquals("one billion", say.say(1_000_000_000));
}
@Ignore("Remove to run test")
@Test
public void nineHundredEightySevenBillionSixHundredFiftyFourThreeHundredTwentyOneThousandOneHundredTwentyThree() {
assertEquals("nine hundred eighty-seven billion six hundred fifty-four million" +
" three hundred twenty-one thousand one hundred twenty-three", say.say(987_654_321_123L));
}
@Ignore("Remove to run test")
@Test(expected = IllegalArgumentException.class)
public void illegalNegativeNumber() {
say.say(-1);
}
@Ignore("Remove to run test")
@Test(expected = IllegalArgumentException.class)
public void illegalTooBigNumber() {
say.say(1_000_000_000_000L);
}
}