-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathProblem6Test.java
More file actions
77 lines (48 loc) · 1.8 KB
/
Problem6Test.java
File metadata and controls
77 lines (48 loc) · 1.8 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
package io.zipcoder;
import org.junit.Assert;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class Problem6Test {
@Test
public void problemTest1(){
Problem6 problem6 = new Problem6("1:30pm");
String expected = "Thirteen Hundred and Thirty Hours ";
String actual = problem6.convertToMilitaryTimePhrase();
Assert.assertEquals(expected, actual);
}
@Test
public void problemTest2(){
Problem6 problem6 = new Problem6("1:30am");
String expected = "Zero One Hundred and Thirty Hours ";
String actual = problem6.convertToMilitaryTimePhrase();
Assert.assertEquals(expected, actual);
}
@Test
public void problemTest3(){
Problem6 problem6 = new Problem6("2:22pm");
String expected = "Fourteen Hundred and Twenty Two Hours ";
String actual = problem6.convertToMilitaryTimePhrase();
Assert.assertEquals(expected, actual);
}
@Test
public void problemTest4(){
Problem6 problem6 = new Problem6("2:11am");
String expected = "Zero Two Hundred and Eleven Hours ";
String actual = problem6.convertToMilitaryTimePhrase();
Assert.assertEquals(expected, actual);
}
@Test
public void problemTest5(){
Problem6 problem6 = new Problem6("10:02am");
String expected = "Ten Hundred Zero Two Hours ";
String actual = problem6.convertToMilitaryTimePhrase();
Assert.assertEquals(expected, actual);
}
@Test
public void camelCaseSentence(){
Problem6 problem6 = new Problem6("10:02am");
String actual = problem6.camelCaseSentence("ten hundred zero two hours ");
String expected = "Ten Hundred Zero Two Hours ";
Assert.assertEquals(expected, actual);
}
}