use of io.vertigo.core.component.aop.data.components.F in project vertigo by KleeGroup.
the class AspectTest method testOneMoreOnClass.
@Test
public final void testOneMoreOnClass() {
final F f = getApp().getComponentSpace().resolve(F.class);
// On vérifie que l'intercepteur ajoute bien 1 à la somme de 2+3
assertEquals(11, f.getValue(10));
assertEquals(12, f.getValue2(10));
assertEquals(22, f.getValue3(10));
}
use of io.vertigo.core.component.aop.data.components.F in project vertigo by KleeGroup.
the class AspectTest method testUnwrapp.
@Test
public final void testUnwrapp() {
final AopPlugin aopPlugin = getApp().getConfig().getBootConfig().getAopPlugin();
final F f = getApp().getComponentSpace().resolve(F.class);
// Il y a des aspects sur la classe donc elle doit être dewrappable
assertNotEquals(F.class.getName(), f.getClass().getName());
assertEquals(F.class.getName(), aopPlugin.unwrap(f).getClass().getName());
// Il y a pas d'aspect
final A myA = getApp().getComponentSpace().resolve(A.class);
assertEquals(A.class.getName(), myA.getClass().getName());
assertEquals(A.class.getName(), aopPlugin.unwrap(myA).getClass().getName());
}