From 3bab16fcb063a69b3c894343cefcc0eb54958843 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Sat, 22 Jun 2013 16:05:43 +0200 Subject: fix #2914: bike navigation --- .../apps/cache/navi/NavigationAppFactoryTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java (limited to 'tests') diff --git a/tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java b/tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java new file mode 100644 index 0000000..2d510ab --- /dev/null +++ b/tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java @@ -0,0 +1,19 @@ +package cgeo.geocaching.apps.cache.navi; + +import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum; + +import java.util.HashSet; + +import junit.framework.TestCase; + +public class NavigationAppFactoryTest extends TestCase { + + public static void testUniqueNavigationAppIds() throws Exception { + final HashSet idSet = new HashSet(); + for (NavigationAppsEnum navigationApp : NavigationAppsEnum.values()) { + idSet.add(navigationApp.id); + } + assertEquals("Duplicate id in " + NavigationAppsEnum.class.getSimpleName(), NavigationAppsEnum.values().length, idSet.size()); + } + +} -- cgit v1.1