-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathProblem6Test.java
More file actions
81 lines (61 loc) · 2.21 KB
/
Problem6Test.java
File metadata and controls
81 lines (61 loc) · 2.21 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
package io.zipcoder;
import org.junit.Assert;
import org.junit.Test;
public class Problem6Test {
@Test
public void testMilitaryTimeConverter1(){
Problem6 test = new Problem6();
String input = "1:30pm";
String expected = "Thirteen Hundred and Thirty Hours";
String actual = test.militaryTimeConverter(input);
Assert.assertEquals(expected,actual);
}
@Test
public void testMilitaryTimeConverter2(){
Problem6 test = new Problem6();
String input = "7:30pm";
String expected = "Ninteen Hundred and Thirty Hours";
String actual = test.militaryTimeConverter(input);
Assert.assertEquals(expected,actual);
}
@Test
public void testMilitaryTimeConverter3(){
Problem6 test = new Problem6();
String input = "2:11am";
String expected = "Zero Two Hundred and Eleven Hours";
String actual = test.militaryTimeConverter(input);
Assert.assertEquals(expected,actual);
}
@Test
public void testMilitaryTimeConverter4(){
Problem6 test = new Problem6();
String input = "11:55pm";
String expected = "Twenty Three Hundred and Fifty Five Hours";
String actual = test.militaryTimeConverter(input);
Assert.assertEquals(expected,actual);
}
@Test
public void testMilitaryTimeConverter5(){
Problem6 test = new Problem6();
String input = "1:22am";
String expected = "Zero One Hundred and Twenty Two Hours";
String actual = test.militaryTimeConverter(input);
Assert.assertEquals(expected,actual);
}
@Test
public void testMilitaryTimeConverter6(){
Problem6 test = new Problem6();
String input = "12:00am";
String expected = "Zero Zero Hundred and Zero Zero Hours";
String actual = test.militaryTimeConverter(input);
Assert.assertEquals(expected,actual);
}
@Test
public void testMilitaryTimeConverter7(){
Problem6 test = new Problem6();
String input = "12:00pm";
String expected = "Twelve Hundred and Zero Zero Hours";
String actual = test.militaryTimeConverter(input);
Assert.assertEquals(expected,actual);
}
}