File tree Expand file tree Collapse file tree
algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .baeldung .algorithms .mercator ;
22
3+ import org .junit .Assert ;
34import org .junit .Test ;
45
56
67public class EllipticalMercatorUnitTest {
78
89 @ Test
9- public void givenThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
10+ public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
1011 Mercator mercator = new EllipticalMercator ();
1112 double result = mercator .xAxisProjection (22 );
12- assert result == 2449028.7974520186 ;
13+ Assert . assertEquals ( result , 2449028.7974520186 , 0.0 ) ;
1314 }
1415
1516 @ Test
16- public void givenThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
17+ public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
1718 Mercator mercator = new EllipticalMercator ();
1819 double result = mercator .yAxisProjection (44 );
19- assert result == 5435749.887511954 ;
20+ Assert . assertEquals ( result , 5435749.887511954 , 0.0 ) ;
2021 }
2122}
Original file line number Diff line number Diff line change 11package com .baeldung .algorithms .mercator ;
22
3+ import org .junit .Assert ;
34import org .junit .Test ;
4- import static junit .framework .TestCase .assertEquals ;
55
66public class SphericalMercatorUnitTest {
77
88 @ Test
9- public void givenThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
9+ public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
1010 Mercator mercator = new SphericalMercator ();
1111 double result = mercator .xAxisProjection (22 );
12- assert result == 2449028.7974520186 ;
12+ Assert . assertEquals ( result , 2449028.7974520186 , 0.0 ) ;
1313 }
1414
1515 @ Test
16- public void givenThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
16+ public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne () {
1717 Mercator mercator = new SphericalMercator ();
1818 double result = mercator .yAxisProjection (44 );
19- assert result == 5465442.183322753 ;
19+ Assert . assertEquals ( result , 5465442.183322753 , 0.0 ) ;
2020 }
2121}
You can’t perform that action at this time.
0 commit comments