use of cn.taketoday.context.support.ClassPathXmlApplicationContext in project today-infrastructure by TAKETODAY.
the class MixinProxyTargetClassTrueConfig method testTwoAdviceAspect.
@Test
public void testTwoAdviceAspect() {
ClassPathXmlApplicationContext bf = newContext("twoAdviceAspect.xml");
ITestBean adrian1 = (ITestBean) bf.getBean("adrian");
testAgeAspect(adrian1, 0, 2);
}
use of cn.taketoday.context.support.ClassPathXmlApplicationContext in project today-infrastructure by TAKETODAY.
the class MixinProxyTargetClassTrueConfig method testAspectsAndAdvisorAreApplied.
@Test
public void testAspectsAndAdvisorAreApplied() {
ClassPathXmlApplicationContext ac = newContext("aspectsPlusAdvisor.xml");
ITestBean shouldBeWeaved = (ITestBean) ac.getBean("adrian");
doTestAspectsAndAdvisorAreApplied(ac, shouldBeWeaved);
}
use of cn.taketoday.context.support.ClassPathXmlApplicationContext in project today-infrastructure by TAKETODAY.
the class GenericCounterAspect method setup.
@SuppressWarnings("unchecked")
@org.junit.jupiter.api.BeforeEach
public void setup() {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass());
counterAspect = (GenericCounterAspect) ctx.getBean("counterAspect");
counterAspect.count = 0;
testBean = (DerivedInterface<String>) ctx.getBean("testBean");
}
use of cn.taketoday.context.support.ClassPathXmlApplicationContext in project today-infrastructure by TAKETODAY.
the class CounterAspect method setup.
@BeforeEach
public void setup() {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass());
counterAspect = (CounterAspect) ctx.getBean("counterAspect");
counterAspect.reset();
testBean = (GenericReturnTypeVariationClass) ctx.getBean("testBean");
}
use of cn.taketoday.context.support.ClassPathXmlApplicationContext in project today-infrastructure by TAKETODAY.
the class TestMethodInterceptor method setup.
@BeforeEach
public void setup() {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass());
testBean = (AnnotatedTestBean) ctx.getBean("testBean");
}
Aggregations