-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathProblem6Test.java
More file actions
64 lines (55 loc) · 1.74 KB
/
Problem6Test.java
File metadata and controls
64 lines (55 loc) · 1.74 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
package io.zipcoder;
import org.junit.Assert;
import org.junit.Test;
public class Problem6Test {
@Test
public void testTime() {
Problem6 problem6 = new Problem6();
String input = "1:30pm";
String[] expected = {"1","30pm"};
String[] actual = problem6.splitString(input);
Assert.assertEquals(expected, actual);
}
@Test
public void testGetHour() {
Problem6 problem6 = new Problem6();
String input = "1:30pm";
Integer expected = 13;
Integer actual = problem6.parseIntoHour(input);
Assert.assertEquals(expected, actual);
}
@Test
public void testGetMilitaryTime1() {
Problem6 problem6 = new Problem6();
Integer input = 5;
String expected = "Zero Five";
String actual = problem6.getMilitaryHour(input);
Assert.assertEquals(expected, actual);
}
@Test
public void testGetMilitaryTime() {
Problem6 problem6 = new Problem6();
Integer input = 13;
String expected = "Thirteen";
String actual = problem6.getMilitaryHour(input);
Assert.assertEquals(expected, actual);
}
@Test
public void testMinuteTime() {
Problem6 problem6 = new Problem6();
String input = "1:30pm";
Integer expected = 30;
Integer actual = problem6.parseMinutes(input);
System.out.println(actual);
Assert.assertEquals(expected, actual);
}
@Test
public void testMilitaryMinutes() {
Problem6 problem6 = new Problem6();
Integer input = 30;
String expected = "Thirty ";
String actual = problem6.getMilitaryMinutes(input);
System.out.println(actual);
Assert.assertEquals(expected, actual);
}
}