package cgeo.geocaching.utils; import static org.assertj.core.api.Assertions.assertThat; import cgeo.geocaching.Geocache; import junit.framework.TestCase; public class CheckerUtilsTest extends TestCase { public static void testGetCheckerUrl() throws Exception { assertUrl("

Haarige Aussichten gibt es hier.

", "http://www.geochecker.com/index.php?code=cd52752a8649c5e385a624b5341176f9&action=check&wp=4743314a43384b&name=4b61747a656e&language=German"); } private static void assertUrl(final String description, final String expected) { final Geocache geocache = new Geocache(); geocache.setDescription(description); assertThat(CheckerUtils.getCheckerUrl(geocache)).isEqualTo(expected); } }