Exemple #1
0
 /** Test of asDbKey method, of class Canton. */
 @Test
 public void testAsDbKeyBe() {
   ApplicationInfo.info(
       CantonTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, "testAsDbKeyBe");
   Canton instance = Canton.BE;
   String expResult = "02";
   String result = instance.asDbKey();
   assertEquals(expResult, result);
 }
Exemple #2
0
 /** 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);
 }
Exemple #3
0
 @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());
 }
Exemple #4
0
 /** Test of values method, of class Canton. */
 @Test
 public void testValues() {
   ApplicationInfo.info(
       CantonTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, "testValues");
   Canton[] result = Canton.values();
   assertEquals(26, result.length);
 }
Exemple #5
0
 /** Test of fromDbKey method, of class Canton. */
 @Test
 public void testFromDbKeyAg() {
   ApplicationInfo.info(
       CantonTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, "testFromDbKeyAg");
   String aRecordKey = "19";
   Canton expResult = Canton.AG;
   Canton result = Canton.fromDbKey(aRecordKey);
   assertEquals(expResult, result);
 }
Exemple #6
0
 /** Test of fromGeoId method, of class Canton. */
 @Test
 public void testFromGeoIdBe() {
   ApplicationInfo.info(
       CantonTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, "testFromGeoIdBe");
   int aGeoId = 2;
   Canton expResult = Canton.BE;
   Canton result = Canton.fromGeoId(aGeoId);
   assertEquals(expResult, result);
 }
Exemple #7
0
 /** Test of valueOf method, of class Canton. */
 @Test
 public void testValueOf() {
   ApplicationInfo.info(
       CantonTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, "testValueOf");
   String name = "BE";
   Canton expResult = Canton.BE;
   Canton result = Canton.valueOf(name);
   assertEquals(expResult, result);
 }