@Test public void testAsMethodOn() { Method[] methods = new Method[methodSignatures.length]; for (int i = 0; i < methodSignatures.length; i++) { methods[i] = MethodProperty.methodFrom( methodSignatures[i], MethodProperty.CLASS_METHOD_DELIMITER, MethodProperty.METHOD_ARG_DELIMITER); assertNotNull("Unable to identify method: " + methodSignatures[i], methods[i]); } String translatedMethod = null; for (int i = 0; i < methods.length; i++) { translatedMethod = MethodProperty.asStringFor(methods[i]); assertTrue( "Translated method does not match", ClassUtil.withoutPackageName(methodSignatures[i]) .equals(ClassUtil.withoutPackageName(translatedMethod))); } }
@Test public void testAsStringOn() { Method method = null; for (int i = 0; i < methodSignatures.length; i++) { method = MethodProperty.methodFrom( methodSignatures[i], MethodProperty.CLASS_METHOD_DELIMITER, MethodProperty.METHOD_ARG_DELIMITER); assertNotNull("Unable to identify method: " + methodSignatures[i], method); } }