aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java
blob: 2d510ab9cee1e88d529460160672bb1670f96a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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<Integer> idSet = new HashSet<Integer>();
        for (NavigationAppsEnum navigationApp : NavigationAppsEnum.values()) {
            idSet.add(navigationApp.id);
        }
        assertEquals("Duplicate id in " + NavigationAppsEnum.class.getSimpleName(), NavigationAppsEnum.values().length, idSet.size());
    }

}