public boolean matches(Object obj0, Object obj1) { return (obj0 instanceof Double || obj1 instanceof Double || obj0 instanceof Float || obj1 instanceof Float || (obj0 instanceof String && ELSupport.isStringFloat((String) obj0)) || (obj1 instanceof String && ELSupport.isStringFloat((String) obj1))); }
public void testCoerceEnumAToEnumA() { Object output = null; try { output = ELSupport.coerceToEnum(TestEnumA.VALA1, TestEnumA.class); } finally { assertEquals(TestEnumA.VALA1, output); } }
public void testCoerceEnumAToEnumC() { Object output = null; try { output = ELSupport.coerceToEnum(TestEnumA.VALA1, TestEnumC.class); } catch (ELException ele) { // Ignore } assertNull(output); }
public void testCoerceNullToNumber() { Object output = ELSupport.coerceToType(null, Number.class); assertEquals(Long.valueOf(0), output); }
public void testCoerceIntegerToNumber() { Integer input = 4390241; Object output = ELSupport.coerceToType(input, Number.class); assertEquals(input, output); }
public void testEquals() { assertTrue(ELSupport.equals("01", Long.valueOf(1))); }
private static void testIsSame(Object value) { assertEquals(value, ELSupport.coerceToNumber(value, value.getClass())); }