blob: e3e64f6f09b5483bc23a787700d993ba438bbf48 (
plain)
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
|
package ca.mokhan.test;
import Q10.*;
import java.io.*;
import java.text.*;
import java.util.*;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public class StationTest extends TestCase {
private Station subject;
public StationTest(String testName) {
super(testName);
this.subject = new Station("Edmonton", new Date(1546470000000L), new Date(1546473540000L), 2);
}
public static Test suite() {
return new TestSuite(StationTest.class);
}
public void test_getArrival() {
assertEquals("23:00", subject.getArrival());
}
public void test_getDeparture() {
assertEquals("23:59", subject.getDeparture());
}
public void test_delayBy() {
subject.delayBy(30);
assertEquals("23:30", subject.getArrival());
assertEquals("00:29", subject.getDeparture());
assertEquals(3, subject.getDay());
}
}
|