package junitTests;
import static org.junit.Assert.assertTrue;

import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import carPooler.domain.GeoPosition;

public class TestGeoPosition {

	private static Logger logger = LoggerFactory.getLogger(TestGeoPosition.class);

	GeoPosition testGeoPosotion;

	@Before
	public void before() {
		// Create a new GeoPosition for each test
		testGeoPosotion = new GeoPosition(5.55,5.55);
	}

	@Test
	public void testGeoPositionFromString() {
		String asString = testGeoPosotion.toString();
		logger.info(asString);
		assertTrue(asString.equals("(5.55,5.55)"));
		GeoPosition fromString = new GeoPosition(asString);
		assertTrue(testGeoPosotion.equals(fromString));
	}

}

@@ -14,16 +14,18 @@
 Tests;%0D%0A
+%0D%0A
 import s
@@ -480,24 +480,25 @@
 sition(5.55,
+ 
 5.55);%0D%0A%09%7D%0D%0A
@@ -720,32 +720,32 @@
 ion(asString);%0D%0A
-
 %09%09assertTrue(tes
@@ -785,11 +785,412 @@
 %0D%0A%09%7D%0D%0A%0D%0A
+%09@Test%0D%0A%09public void testLengthTo() %7B%0D%0A%09%09// Make another GeoPosition%0D%0A%09%09GeoPosition position2 = new GeoPosition(0.0, 0.0);%0D%0A%09%09// Check that the length is the same each way%0D%0A%09%09assertTrue(position2.lengthTo(testGeoPosotion) == testGeoPosotion.lengthTo(position2));%0D%0A%09%09logger.info(%22length is: %22 + position2.lengthTo(testGeoPosotion));%0D%0A%09%09assertTrue(position2.lengthTo(testGeoPosotion) == 871226);%0D%0A%09%7D%0D%0A%0D%0A
 %7D%0D%0A

Add test for GeoPosition.lengthTo()