/** Test of asGeoId method, of class Canton. */ @Test public void testAsGeoIdBe() { ApplicationInfo.info( CantonTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, "testAsGeoIdBe"); Canton instance = Canton.BE; Integer expResult = new Integer(2); Integer result = instance.asGeoId(); assertEquals(expResult, result); }
@Test public void testUniqueGeoIds() { ApplicationInfo.info( CantonTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, "testUniqueGeoIds"); Set<Integer> uniqueIds = new HashSet<Integer>(); for (Canton canton : Canton.values()) { uniqueIds.add(canton.asGeoId()); } assertEquals(Canton.values().length, uniqueIds.size()); }