assertEquals(d.gotoState, d.stateMachine.getCurrentState()); assertEquals(1, leh.getHistory().size()); assertEquals(p1, d.gotoState.getDestination()); assertFalse(d.gotoState.prevDestination.isPresent()); assertEquals(d.gotoState, ev2.newState); assertEquals(p2, d.gotoState.getDestination()); assertEquals(p1, d.gotoState.getPreviousDestination()); } else { assertEquals(1, leh.getHistory().size()); assertEquals(p1, d.gotoState.getDestination()); assertFalse(d.gotoState.prevDestination.isPresent());
&& !getPDPModel().getParcelState(gotoState.getPreviousDestination()) .isPickedUp()) { final Parcel prev = gotoState.getPreviousDestination(); if (communicator.getClaimedParcels().contains(prev)) { communicator.unclaim(prev);
final Goto gotos = new Goto(); final WaitAtService waitAtService = new WaitAtService(); final Service service = new Service();
final Goto gotos = new Goto(); final WaitAtService waitAtService = new WaitAtService(); final Service service = new Service();
/** * Tests correct exception when calling prev destination at wrong time. */ @Test(expected = IllegalStateException.class) public void getpreviousDestinationFail() { d.gotoState.getPreviousDestination(); }
/** * Tests correct exception when calling destination at wrong time. */ @Test(expected = IllegalStateException.class) public void getDestinationFail() { d.gotoState.getDestination(); }