-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathProblem6Test.java
More file actions
49 lines (41 loc) · 1.29 KB
/
Problem6Test.java
File metadata and controls
49 lines (41 loc) · 1.29 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
package io.zipcoder;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class Problem6Test {
Problem6 problem6;
@Before
public void setup(){
problem6 = new Problem6();
}
@Test
public void onethirtyTest(){
String actual = problem6.militaryTime("1:30am");
String expected = "Zero One Hundred and Thirty Hours";
Assert.assertEquals(expected, actual);
}
@Test
public void oneThirtyPmTest(){
String actual = problem6.militaryTime("1:30pm");
String expected = "Thirteen Hundred and Thirty Hours";
Assert.assertEquals(expected, actual);
}
@Test
public void fiveFourtyFivePmTest(){
String actual = problem6.militaryTime("5:45pm");
String expected = "Seventeen Hundred and Forty Five Hours";
Assert.assertEquals(expected, actual);
}
@Test
public void tenOhTwoAmTest(){
String actual = problem6.militaryTime("10:02am");
String expected = "Ten Hundred Zero Two Hours";
Assert.assertEquals(expected, actual);
}
@Test
public void twoElevenAmTest(){
String actual = problem6.militaryTime("2:11am");
String expected = "Zero Two Hundred and Eleven Hours";
Assert.assertEquals(expected, actual);
}
}