Просмотр исходного кода

Removes unimplemented tests.

Outside of some spelling changes as the testing frameworks changed
over time, these tests haven't tested the production code since
circa 2009.
Danil 8 лет назад
Родитель
Сommit
accd9d341e

+ 0
- 75
src/test/java/se/citerus/dddsample/domain/model/cargo/DeliveryTest.java Просмотреть файл

@@ -1,75 +0,0 @@
1
-package se.citerus.dddsample.domain.model.cargo;
2
-
3
-import static org.assertj.core.api.Assertions.assertThat;
4
-import static se.citerus.dddsample.domain.model.location.SampleLocations.HONGKONG;
5
-import static se.citerus.dddsample.domain.model.location.SampleLocations.NEWYORK;
6
-
7
-import java.util.Date;
8
-
9
-import org.junit.Test;
10
-
11
-public class DeliveryTest {
12
-
13
-  private Cargo cargo = new Cargo(new TrackingId("XYZ"), new RouteSpecification(HONGKONG, NEWYORK, new Date()));
14
-
15
-  @Test
16
-  public void testToSilenceWarnings() {
17
-    assertThat(true).isTrue();
18
-  }
19
-  
20
-  /*
21
-  public void testEvensOrderedByTimeOccured() throws Exception {
22
-    DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
23
-    HandlingEvent he1 = new HandlingEvent(cargo, df.parse("2010-01-03"), new Date(), HandlingEvent.Type.RECEIVE, NEWYORK);
24
-    HandlingEvent he2 = new HandlingEvent(cargo, df.parse("2010-01-01"), new Date(), HandlingEvent.Type.LOAD, NEWYORK, CM003);
25
-    HandlingEvent he3 = new HandlingEvent(cargo, df.parse("2010-01-04"), new Date(), HandlingEvent.Type.CLAIM, HONGKONG);
26
-    HandlingEvent he4 = new HandlingEvent(cargo, df.parse("2010-01-02"), new Date(), HandlingEvent.Type.UNLOAD, HONGKONG, CM004);
27
-    Delivery dh = new Delivery(Arrays.asList(he1, he2, he3, he4));
28
-
29
-    List<HandlingEvent> orderEvents = dh.history();
30
-    assertThat(orderEvents).hasSize(4);
31
-    assertThat(orderEvents).containsExactly(he2, he4, he1, he3);
32
-  }
33
-
34
-  public void testCargoStatusFromLastHandlingEvent() {
35
-    Set<HandlingEvent> events = new HashSet<HandlingEvent>();
36
-    Delivery delivery = new Delivery(events);
37
-
38
-    assertThat(delivery.transportStatus()).isEqualTo(TransportStatus.NOT_RECEIVED);
39
-
40
-    events.add(new HandlingEvent(cargo, new Date(10), new Date(11), HandlingEvent.Type.RECEIVE, HAMBURG));
41
-    delivery = new Delivery(events);
42
-    assertThat(delivery.transportStatus()).isEqualTo(TransportStatus.IN_PORT);
43
-
44
-    events.add(new HandlingEvent(cargo, new Date(20), new Date(21), HandlingEvent.Type.LOAD, HAMBURG, CM005));
45
-    delivery = new Delivery(events);
46
-    assertThat(delivery.transportStatus()).isEqualTo(TransportStatus.ONBOARD_CARRIER);
47
-
48
-    events.add(new HandlingEvent(cargo, new Date(30), new Date(31), HandlingEvent.Type.UNLOAD, HAMBURG, CM006));
49
-    delivery = new Delivery(events);
50
-    assertThat(delivery.transportStatus()).isEqualTo(TransportStatus.IN_PORT);
51
-
52
-    events.add(new HandlingEvent(cargo, new Date(40), new Date(41), HandlingEvent.Type.CLAIM, HAMBURG));
53
-    delivery = new Delivery(events);
54
-    assertThat(delivery.transportStatus()).isEqualTo(TransportStatus.CLAIMED);
55
-  }
56
-
57
-  public void testLastKnownLocation() throws Exception {
58
-    Set<HandlingEvent> events = new HashSet<HandlingEvent>();
59
-    Delivery delivery = new Delivery(events);
60
-
61
-    assertThat(delivery.lastKnownLocation()).isEqualTo(Location.UNKNOWN);
62
-
63
-    events.add(new HandlingEvent(cargo, new Date(10), new Date(11), HandlingEvent.Type.RECEIVE, HAMBURG));
64
-    delivery = new Delivery(events);
65
-
66
-    assertThat(delivery.lastKnownLocation()).isEqualTo(HAMBURG);
67
-
68
-    events.add(new HandlingEvent(cargo, new Date(20), new Date(21), HandlingEvent.Type.LOAD, HAMBURG, CM003));
69
-    delivery = new Delivery(events);
70
-
71
-    assertThat(delivery.lastKnownLocation()).isEqualTo(HAMBURG);
72
-  }
73
-  */
74
-  
75
-}

+ 0
- 33
src/test/java/se/citerus/dddsample/domain/model/voyage/ScheduleTest.java Просмотреть файл

@@ -1,33 +0,0 @@
1
-package se.citerus.dddsample.domain.model.voyage;
2
-
3
-import org.junit.Test;
4
-
5
-public class ScheduleTest {
6
-
7
-    @Test
8
-    public void testCarrierMovements() {
9
-        //TODO: Test goes here...
10
-    }
11
-
12
-    @Test
13
-    public void testSameValueAs() {
14
-        //TODO: Test goes here...
15
-    }
16
-
17
-    @Test
18
-    public void testCopy() {
19
-        //TODO: Test goes here...
20
-    }
21
-
22
-    @Test
23
-    public void testEquals() {
24
-        //TODO: Test goes here...
25
-    }
26
-
27
-    @Test
28
-    public void testHashCode() {
29
-        //TODO: Test goes here...
30
-    }
31
-
32
-
33
-}

+ 0
- 40
src/test/java/se/citerus/dddsample/domain/model/voyage/VoyageNumberTest.java Просмотреть файл

@@ -1,40 +0,0 @@
1
-package se.citerus.dddsample.domain.model.voyage;
2
-
3
-import org.junit.Test;
4
-
5
-import junit.framework.TestCase;
6
-
7
-public class VoyageNumberTest extends TestCase {
8
-
9
-    @Test
10
-    public void testEquals() {
11
-        //TODO: Test goes here...
12
-    }
13
-
14
-    @Test
15
-    public void testHashCode() {
16
-        //TODO: Test goes here...
17
-    }
18
-
19
-    @Test
20
-    public void testSameValueAs() {
21
-        //TODO: Test goes here...
22
-    }
23
-
24
-    @Test
25
-    public void testCopy() {
26
-        //TODO: Test goes here...
27
-    }
28
-
29
-    @Test
30
-    public void testToString() {
31
-        //TODO: Test goes here...
32
-    }
33
-
34
-    @Test
35
-    public void testIdString() {
36
-        //TODO: Test goes here...
37
-    }
38
-
39
-
40
-}

+ 0
- 49
src/test/java/se/citerus/dddsample/domain/model/voyage/VoyageTest.java Просмотреть файл

@@ -1,49 +0,0 @@
1
-package se.citerus.dddsample.domain.model.voyage;
2
-
3
-import org.junit.Test;
4
-
5
-import junit.framework.TestCase;
6
-
7
-public class VoyageTest extends TestCase {
8
-
9
-    @Test
10
-    public void testVoyageNumber() {
11
-        //TODO: Test goes here...
12
-    }
13
-
14
-    @Test
15
-    public void testSchedule() {
16
-        //TODO: Test goes here...
17
-    }
18
-
19
-    @Test
20
-    public void testHashCode() {
21
-        //TODO: Test goes here...
22
-    }
23
-
24
-    @Test
25
-    public void testEquals() {
26
-        //TODO: Test goes here...
27
-    }
28
-
29
-    @Test
30
-    public void testSameIdentityAs() {
31
-        //TODO: Test goes here...
32
-    }
33
-
34
-    @Test
35
-    public void testToString() {
36
-        //TODO: Test goes here...
37
-    }
38
-
39
-    @Test
40
-    public void testAddMovement() {
41
-        //TODO: Test goes here...
42
-    }
43
-
44
-    public void testBuild() {
45
-        //TODO: Test goes here...
46
-    }
47
-
48
-
49
-}