Skip to content

Commit e90545f

Browse files
[Mercator]Unit test fox
1 parent eefac39 commit e90545f

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/EllipticalMercatorUnitTest.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22

33
import org.junit.Test;
44

5-
import static junit.framework.TestCase.assertEquals;
65

76
public class EllipticalMercatorUnitTest {
87

98
@Test
109
public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
1110
Mercator mercator = new EllipticalMercator();
1211
double result = mercator.xAxisProjection(22);
13-
assertEquals(result, 2449028.7974520186);
12+
assert result == 2449028.7974520186;
1413
}
1514

1615
@Test
1716
public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
1817
Mercator mercator = new EllipticalMercator();
1918
double result = mercator.yAxisProjection(44);
20-
assertEquals(result, 5435749.887511954);
19+
assert result == 5435749.887511954;
2120
}
2221
}

‎algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/SphericalMercatorUnitTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ public class SphericalMercatorUnitTest {
99
public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
1010
Mercator mercator = new SphericalMercator();
1111
double result = mercator.xAxisProjection(22);
12-
assertEquals(result, 2449028.7974520186);
12+
assert result == 2449028.7974520186;
1313
}
1414

1515
@Test
1616
public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() {
1717
Mercator mercator = new SphericalMercator();
1818
double result = mercator.yAxisProjection(44);
19-
assertEquals(result, 5465442.183322753);
19+
assert result == 5465442.183322753;
2020
}
2121
}

0 commit comments

Comments
 (0)