@@ -0,0 +1,1743 @@
+package fr.unice.polytech.si5.al.projet.s3.truck;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.BDDMockito.willReturn;%0Aimport static org.mockito.Mockito.verify;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class TourTest %7B%0A%0A%09@Mock%0A%09private DropPoint aDropPoint;%0A%09private List%3CDropPoint%3E dropPointList = new ArrayList%3C%3E();%0A%0A%09@Mock%0A%09private Task aDelivery;%0A%09private List%3CTask%3E deliveries = new ArrayList%3C%3E();%0A%0A%09private Tour tour;%0A%0A%09@Before%0A%09public void setUp() %7B%0A%09%09buildDropPoints();%0A%09%09buildDeliveries();%0A%09%7D%0A%0A%09@Test%0A%09public void aTour_WhenBuiltWithTasks_ShouldHaveDropPoint() %7B%0A%09%09this.tour = new Tour(dropPointList);%0A%09%09assertEquals(1,this.tour.getTaskStack().size());%0A%09%7D%0A%0A%09@Test%0A%09public void aTour_WhenExecuteIsCalled_ShouldCallDevelopOnTopOfTheStack() %7B%0A%09%09this.tour = new Tour(dropPointList);%0A%09%09this.tour.execute();%0A%09%09verify(aDropPoint).develop();%0A%09%7D%0A%0A%09@Test%0A%09public void aTour_WhenExecuteIsCalled_ShouldPushTasksOnTopOfTheStack() %7B%0A%09%09this.tour = new Tour(dropPointList);%0A%09%09this.tour.execute();%0A%09%09assertEquals(2, this.tour.getTaskStack().size());%0A%09%7D%0A%0A%09@Test%0A%09public void aTour_WhenExecuteIsCalled_ShouldCallExecuteOnTopOfTheStack() %7B%0A%09%09this.tour = new Tour(dropPointList);%0A%09%09this.tour.execute();%0A%09%09verify(aDelivery).execute();%0A%09%7D%0A%0A%09private void buildDropPoints() %7B%0A%09%09dropPointList.add(aDropPoint);%0A%09%7D%0A%0A%09private void buildDeliveries() %7B%0A%09%09//%09Add mock to list of mocks%0A%09%09this.deliveries.add(aDelivery);%0A%0A%09%09//%09DropPoint#develop will return the list of mocks%0A%09%09willReturn(deliveries).given(aDropPoint).develop();%0A%09%7D%0A%7D%0A

Add basic Tour test