package tests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class PathTest {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		fail("Not yet implemented");
	}

}

@@ -44,16 +44,45 @@
 ert.*;%0A%0A
+import java.util.ArrayList;%0A%0A
 import o
@@ -150,203 +150,1625 @@
 t;%0A%0A
-public class PathTest %7B%0A%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%09%7D%0A%0A%09@After%0A%09public void tearDown() throws Exception %7B%0A%09%7D%0A%0A%09@Test%0A%09public void test() %7B%0A%09%09fail(%22Not yet implemented%22);%0A%09%7D%0A
+import junit.framework.TestCase;%0Aimport model.Delivery;%0Aimport model.Path;%0Aimport model.Section;%0A%0Apublic class PathTest extends TestCase%7B%0A%09%0A%09private Path path;%0A%09private Delivery departure;%0A%09private Delivery arrival;%0A%09private ArrayList%3CSection%3E sections;%0A%09%0A%09public PathTest (String name) %7B%0A%09%09super(name);%0A%09%7D%0A%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%09%09super.setUp();%0A%09%09departure = new Delivery(1,2,0);%0A%09%09arrival = new Delivery(2,4,2);%0A%09%09sections.add(new Section(%22v0%22,0,1,4.3,100.0));%0A%09%09sections.add(new Section(%22v1%22,0,2,3.2,50.0));%0A%09%09sections.add(new Section(%22v2%22,1,2,2.8,150.0));%0A%09%09sections.add(new Section(%22v3%22,2,1,2.8,150.0));%0A%09%09path = new Path(departure, arrival, sections);%0A%09%7D%0A%0A%09@After%0A%09public void tearDown() throws Exception %7B%0A%09%09super.tearDown();%0A%09%09path = null;%0A%09%7D%0A%0A%09@Test//---------------------------------------------------%0A%09public void test() %7B%0A%09%09fail(%22Not yet implemented%22);%0A%09%7D%0A%09@Test%0A%09public void testPath() %7B%0A%09%09assertNotNull(%22Instance is created%22, path);%0A%09%7D%0A%09%0A%09@Test%0A%09public void testGetSetSetions() %7B%0A%09%09ArrayList%3CSection %3E s = new ArrayList%3CSection%3E();%0A%09%09sections.add(new Section(%22v2%22,1,2,2.8,150.0));%0A%09%09sections.add(new Section(%22v3%22,2,1,2.8,150.0));%0A%09%09path.SetSections(s);%0A%09%09assertEquals(%22Is that sections correct%22, sections, path.getSections());%0A%09%09%0A%09%7D%0A%09%0A%09@Test%0A%09public void testGetSetDeparture() %7B%0A%09%09Delivery d = new Delivery (1,2,3);%0A%09%09path.setDeparture(d);%0A%09%09assertEquals(%22Is that departure correct%22, departure, path.getDeparture());%0A%09%7D%0A%09%0A%09@Test%0A%09public void testGetSetArrival() %7B%0A%09%09Delivery a = new Delivery (1,2,3);%0A%09%09assertEquals(%22Is that arrival correct%22, arrival, path.getArrival());%0A%09%7D%0A%09
 %0A%7D%0A

Add tests for path