-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathProblem6Test.java
More file actions
41 lines (39 loc) · 1.3 KB
/
Problem6Test.java
File metadata and controls
41 lines (39 loc) · 1.3 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
package io.zipcoder;
import org.junit.Assert;
import org.junit.Test;
public class Problem6Test {
Problem6 problem6 = new Problem6();
@Test
public void testConvertTo24Hours(){
String expected= "14:30";
String actual = problem6.convertTo24Hours("2:30 pm");
Assert.assertEquals(expected,actual);
System.out.println(actual);
}
//output should Fourteen Hundred and Thirty Hours
@Test
public void testConvert() {
String expected = "Fourteen Hundred and Thirty Hours";
String actual = problem6.convertToMilitaryTime("2:30 pm");
Assert.assertEquals(expected, actual);
}
@Test
public void testConvert2(){
String expected="Fourteen Hundred and Zero Hours";
String actual = problem6.convertToMilitaryTime("2:00 pm");
Assert.assertEquals(expected,actual);
System.out.println(actual);
}
@Test
public void testConvertTo24Hours2(){
String expected = "09:00";
String actual = problem6.convertTo24Hours("9:00 am");
Assert.assertEquals(expected,actual);
}
@Test
public void testConvert3(){
String expected ="Zero Two Hundred and Eleven Hours";
String actual = problem6.convertToMilitaryTime("2:11 am");
Assert.assertEquals(expected,actual);
}
}