assertEquals("BatmanHero37W88.3CatWoman99speeeeedXRAYnull", ReflectUtil.invoke(hero, "name"));
}
@Test
public void testClassAnnotationsWrapper() throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
WrapperProxetta proxetta = WrapperProxetta
.withAspects(
new ProxyAspect(HeroProxyAdvice2.class,
new AllRealMethodsPointcut() {
@Override
public boolean apply(MethodInfo methodInfo) {
if (!methodInfo.isTopLevelMethod()) {
return false;
}
return super.apply(methodInfo);
}
}))
//.setDebugFolder("/Users/igor/")
;
WrapperProxettaBuilder proxettaBuilder = proxetta.builder();
proxettaBuilder.setTarget(Hero.class);
proxetta.setVariableClassName(true);
Object hero = proxettaBuilder.newInstance();
assertEquals("SilverHero89W99.222None1000speeeeedXRAYnull", ReflectUtil.invoke(hero, "name"));
}