[Mercator]Unit test fox
This commit is contained in:
parent
eefac3911d
commit
e90545f3b7
|
@ -2,7 +2,6 @@ package com.baeldung.algorithms.mercator;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static junit.framework.TestCase.assertEquals;
|
|
||||||
|
|
||||||
public class EllipticalMercatorUnitTest {
|
public class EllipticalMercatorUnitTest {
|
||||||
|
|
||||||
|
@ -10,13 +9,13 @@ public class EllipticalMercatorUnitTest {
|
||||||
public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
||||||
Mercator mercator = new EllipticalMercator();
|
Mercator mercator = new EllipticalMercator();
|
||||||
double result = mercator.xAxisProjection(22);
|
double result = mercator.xAxisProjection(22);
|
||||||
assertEquals(result, 2449028.7974520186);
|
assert result == 2449028.7974520186;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
||||||
Mercator mercator = new EllipticalMercator();
|
Mercator mercator = new EllipticalMercator();
|
||||||
double result = mercator.yAxisProjection(44);
|
double result = mercator.yAxisProjection(44);
|
||||||
assertEquals(result, 5435749.887511954);
|
assert result == 5435749.887511954;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,13 @@ public class SphericalMercatorUnitTest {
|
||||||
public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
||||||
Mercator mercator = new SphericalMercator();
|
Mercator mercator = new SphericalMercator();
|
||||||
double result = mercator.xAxisProjection(22);
|
double result = mercator.xAxisProjection(22);
|
||||||
assertEquals(result, 2449028.7974520186);
|
assert result == 2449028.7974520186;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
|
||||||
Mercator mercator = new SphericalMercator();
|
Mercator mercator = new SphericalMercator();
|
||||||
double result = mercator.yAxisProjection(44);
|
double result = mercator.yAxisProjection(44);
|
||||||
assertEquals(result, 5465442.183322753);
|
assert result == 5465442.183322753;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue