-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathProblem6Test.java
More file actions
52 lines (36 loc) · 1.11 KB
/
Problem6Test.java
File metadata and controls
52 lines (36 loc) · 1.11 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
package io.zipcoder;
import org.junit.Assert;
import org.junit.Test;
public class Problem6Test {
Problem6 problem6 = new Problem6();
@Test
public void getPmOrAmTest(){
String expected = "am";
String actual = problem6.getPmOrAm ("1:30am");
Assert.assertEquals (expected, actual);
}
@Test
public void getNumberWithOutamOrPm(){
String expected = "1:30";
String actual = problem6.getNumberWithOutamOrPm ("1:30am");
Assert.assertEquals (expected, actual);
}
@Test
public void removeSemicolonTest(){
String expected = "130";
String actual = problem6.removeSemicolon (problem6.getNumberWithOutamOrPm ("1:30am"));
Assert.assertEquals (expected, actual);
}
@Test
public void numberToIntTest(){
int expected = 130;
int actual = problem6.numberToInt ("130");
Assert.assertEquals (expected, actual);
}
@Test
public void cleanNumberTest(){
int expected = 130;
int actual = problem6.cleanNumber ("1:30pm");
Assert.assertEquals (expected, actual);
}
}