Fixed capitalisation that was pointed out by Erika in the Tests
- LegTest.java ORIGIN_Compound_MARKER is now ORIGIN_COMPOUND_MARKER #story[877]
This commit is contained in:
@@ -14,7 +14,7 @@ import static junit.framework.TestCase.assertEquals;
|
||||
*/
|
||||
public class LegTest {
|
||||
|
||||
private Marker ORIGIN_Compound_MARKER = new Marker(new GPSCoordinate(0, 0));
|
||||
private Marker ORIGIN_COMPOUND_MARKER = new Marker(new GPSCoordinate(0, 0));
|
||||
|
||||
@Test
|
||||
public void calculateDistanceHandles5nmNorth() {
|
||||
@@ -23,7 +23,7 @@ public class LegTest {
|
||||
calc.setDirection(0, 5 * Constants.NMToMetersConversion);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_Compound_MARKER, endMarker, 0);
|
||||
Leg test = new Leg("Test", ORIGIN_COMPOUND_MARKER, endMarker, 0);
|
||||
assertEquals(test.getDistance(), 5, 1e-8);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class LegTest {
|
||||
calc.setDirection(90, 12 * Constants.NMToMetersConversion);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_Compound_MARKER, endMarker, 0);
|
||||
Leg test = new Leg("Test", ORIGIN_COMPOUND_MARKER, endMarker, 0);
|
||||
assertEquals(test.getDistance(), 12, 1e-8);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class LegTest {
|
||||
calc.setDirection(180, 0.5 * Constants.NMToMetersConversion);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_Compound_MARKER, endMarker, 0);
|
||||
Leg test = new Leg("Test", ORIGIN_COMPOUND_MARKER, endMarker, 0);
|
||||
assertEquals(test.getDistance(), 0.5, 1e-8);
|
||||
}
|
||||
|
||||
@@ -56,14 +56,14 @@ public class LegTest {
|
||||
calc.setDirection(-90, 0.1 * Constants.NMToMetersConversion);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_Compound_MARKER, endMarker, 0);
|
||||
Leg test = new Leg("Test", ORIGIN_COMPOUND_MARKER, endMarker, 0);
|
||||
assertEquals(test.getDistance(), 0.1, 1e-8);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void calculateDistanceHandlesZeroDifference() {
|
||||
|
||||
Leg test = new Leg("Test", ORIGIN_Compound_MARKER, ORIGIN_Compound_MARKER, 0);
|
||||
Leg test = new Leg("Test", ORIGIN_COMPOUND_MARKER, ORIGIN_COMPOUND_MARKER, 0);
|
||||
assertEquals(test.getDistance(), 0, 1e-8);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user