コード例 #1
0
 public void testCoerceEnumAToEnumA() {
   Object output = null;
   try {
     output = ELSupport.coerceToEnum(TestEnumA.VALA1, TestEnumA.class);
   } finally {
     assertEquals(TestEnumA.VALA1, output);
   }
 }
コード例 #2
0
 public void testCoerceEnumAToEnumC() {
   Object output = null;
   try {
     output = ELSupport.coerceToEnum(TestEnumA.VALA1, TestEnumC.class);
   } catch (ELException ele) {
     // Ignore
   }
   assertNull(output);
 }