Last active
November 4, 2015 13:56
-
-
Save FagnerMartinsBrack/0ea854114ca793eca60b to your computer and use it in GitHub Desktop.
EarthLocationTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EarthLocationTest { | |
@Test | |
public void test_southwest_hemisphere_distances() { | |
EarthLocation portoAlegre = new EarthLocation( -30.0277, -51.2287 ); | |
EarthLocation manaus = new EarthLocation( -3.1064, -60.0264 ); | |
int expected = 3133; | |
int distance = portoAlegre.getDistanceOf( manaus ); | |
Assert.assertEquals( expected, distance ); | |
} | |
@Test | |
public void test_northeast_hemisphere_distances() { | |
EarthLocation seoul = new EarthLocation( 37.5665, 126.9779 ); | |
EarthLocation rome = new EarthLocation( 41.8905, 12.4942 ); | |
int expected = 8967; | |
int distance = seoul.getDistanceOf( rome ); | |
Assert.assertEquals( expected, distance ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment