-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathProblem6Test.java
More file actions
48 lines (40 loc) · 1.36 KB
/
Problem6Test.java
File metadata and controls
48 lines (40 loc) · 1.36 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
package io.zipcoder;
import org.junit.Assert;
import org.junit.Test;
public class Problem6Test {
@Test
public void testParse1() {
Problem6 problem6 = new Problem6();
String expected = "Thirteen Hundred and Thirty Hours";
String actual = problem6.buildString("1:30pm");
Assert.assertEquals(expected, actual);
}
@Test
public void testParse2() {
Problem6 problem6 = new Problem6();
String expected = "Zero One Hundred and Thirty Hours";
String actual = problem6.buildString("1:30am");
Assert.assertEquals(expected, actual);
}
@Test
public void testParse3() {
Problem6 problem6 = new Problem6();
String expected = "Fourteen Hundred and Twenty Two Hours";
String actual = problem6.buildString("2:22pm");
Assert.assertEquals(expected, actual);
}
@Test
public void testParse4() {
Problem6 problem6 = new Problem6();
String expected = "Zero Two Hundred and Eleven Hours";
String actual = problem6.buildString("2:11am");
Assert.assertEquals(expected, actual);
}
@Test
public void testParse5() {
Problem6 problem6 = new Problem6();
String expected = "Ten Hundred Zero Two Hours";
String actual = problem6.buildString("10:02am");
Assert.assertEquals(expected, actual);
}
}