refactoring .testsuite .aop.aspectj tests in preparation for migration to .context
This commit is contained in:
parent
eabec18151
commit
6f91ffac62
|
|
@ -45,7 +45,8 @@ public final class AfterAdviceBindingTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("after-advice-tests.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
AdviceBindingTestAspect afterAdviceAspect = (AdviceBindingTestAspect) ctx.getBean("testAspect");
|
AdviceBindingTestAspect afterAdviceAspect = (AdviceBindingTestAspect) ctx.getBean("testAspect");
|
||||||
|
|
||||||
testBeanProxy = (ITestBean) ctx.getBean("testBean");
|
testBeanProxy = (ITestBean) ctx.getBean("testBean");
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ import org.springframework.aop.framework.Advised;
|
||||||
import org.springframework.aop.support.AopUtils;
|
import org.springframework.aop.support.AopUtils;
|
||||||
import org.springframework.beans.ITestBean;
|
import org.springframework.beans.ITestBean;
|
||||||
import org.springframework.beans.TestBean;
|
import org.springframework.beans.TestBean;
|
||||||
import org.springframework.context.ApplicationContext;
|
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -52,13 +51,10 @@ public final class AfterReturningAdviceBindingTests {
|
||||||
this.afterAdviceAspect = anAspect;
|
this.afterAdviceAspect = anAspect;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getConfigPath() {
|
|
||||||
return "afterReturning-advice-tests.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
ApplicationContext ctx = new ClassPathXmlApplicationContext(getConfigPath(), getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
|
|
||||||
afterAdviceAspect = (AfterReturningAdviceBindingTestAspect) ctx.getBean("testAspect");
|
afterAdviceAspect = (AfterReturningAdviceBindingTestAspect) ctx.getBean("testAspect");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,8 @@ public final class AfterThrowingAdviceBindingTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("afterThrowing-advice-tests.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
|
|
||||||
testBean = (ITestBean) ctx.getBean("testBean");
|
testBean = (ITestBean) ctx.getBean("testBean");
|
||||||
afterThrowingAdviceAspect = (AfterThrowingAdviceBindingTestAspect) ctx.getBean("testAspect");
|
afterThrowingAdviceAspect = (AfterThrowingAdviceBindingTestAspect) ctx.getBean("testAspect");
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,9 @@ public class AroundAdviceBindingTests {
|
||||||
|
|
||||||
protected ApplicationContext ctx;
|
protected ApplicationContext ctx;
|
||||||
|
|
||||||
protected String getConfigPath() {
|
|
||||||
return "around-advice-tests.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void onSetUp() throws Exception {
|
public void onSetUp() throws Exception {
|
||||||
ctx = new ClassPathXmlApplicationContext(getConfigPath(), getClass());
|
ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
|
|
||||||
AroundAdviceBindingTestAspect aroundAdviceAspect = ((AroundAdviceBindingTestAspect) ctx.getBean("testAspect"));
|
AroundAdviceBindingTestAspect aroundAdviceAspect = ((AroundAdviceBindingTestAspect) ctx.getBean("testAspect"));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,6 @@ import org.springframework.aop.support.AopUtils;
|
||||||
*/
|
*/
|
||||||
public final class AroundAdviceCircularTests extends AroundAdviceBindingTests {
|
public final class AroundAdviceCircularTests extends AroundAdviceBindingTests {
|
||||||
|
|
||||||
protected String getConfigPath() {
|
|
||||||
return "around-advice-circular-tests.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBothBeansAreProxies() {
|
public void testBothBeansAreProxies() {
|
||||||
Object tb = ctx.getBean("testBean");
|
Object tb = ctx.getBean("testBean");
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ public final class AspectAndAdvicePrecedenceTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("advice-precedence-tests.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
highPrecedenceAspect = (PrecedenceTestAspect) ctx.getBean("highPrecedenceAspect");
|
highPrecedenceAspect = (PrecedenceTestAspect) ctx.getBean("highPrecedenceAspect");
|
||||||
lowPrecedenceAspect = (PrecedenceTestAspect) ctx.getBean("lowPrecedenceAspect");
|
lowPrecedenceAspect = (PrecedenceTestAspect) ctx.getBean("lowPrecedenceAspect");
|
||||||
highPrecedenceSpringAdvice = (SimpleSpringBeforeAdvice) ctx.getBean("highPrecedenceSpringAdvice");
|
highPrecedenceSpringAdvice = (SimpleSpringBeforeAdvice) ctx.getBean("highPrecedenceSpringAdvice");
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,8 @@ public final class AspectJExpressionPointcutAdvisorTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("aspectj.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
testBean = (ITestBean) ctx.getBean("testBean");
|
testBean = (ITestBean) ctx.getBean("testBean");
|
||||||
interceptor = (CallCountingInterceptor) ctx.getBean("interceptor");
|
interceptor = (CallCountingInterceptor) ctx.getBean("interceptor");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,8 @@ public final class BeanNamePointcutAtAspectTests {
|
||||||
|
|
||||||
@org.junit.Before
|
@org.junit.Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("bean-name-pointcut-atAspect-tests.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
counterAspect = (CounterAspect) ctx.getBean("counterAspect");
|
counterAspect = (CounterAspect) ctx.getBean("counterAspect");
|
||||||
testBean1 = (ITestBean) ctx.getBean("testBean1");
|
testBean1 = (ITestBean) ctx.getBean("testBean1");
|
||||||
testBean2 = (ITestBean) ctx.getBean("testBean2");
|
testBean2 = (ITestBean) ctx.getBean("testBean2");
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public final class BeanNamePointcutTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ctx = new ClassPathXmlApplicationContext("bean-name-pointcut-tests.xml", getClass());
|
ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
testBean1 = (ITestBean) ctx.getBean("testBean1");
|
testBean1 = (ITestBean) ctx.getBean("testBean1");
|
||||||
testBean2 = (ITestBean) ctx.getBean("testBean2");
|
testBean2 = (ITestBean) ctx.getBean("testBean2");
|
||||||
testBeanContainingNestedBean = (ITestBean) ctx.getBean("testBeanContainingNestedBean");
|
testBeanContainingNestedBean = (ITestBean) ctx.getBean("testBeanContainingNestedBean");
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,8 @@ public final class BeforeAdviceBindingTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
ApplicationContext ctx = new ClassPathXmlApplicationContext(getConfigPath(), getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
|
|
||||||
testBeanProxy = (ITestBean) ctx.getBean("testBean");
|
testBeanProxy = (ITestBean) ctx.getBean("testBean");
|
||||||
assertTrue(AopUtils.isAopProxy(testBeanProxy));
|
assertTrue(AopUtils.isAopProxy(testBeanProxy));
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ public final class DeclarationOrderIndependenceTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("topsy-turvy-aspect.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
aspect = (TopsyTurvyAspect) ctx.getBean("topsyTurvyAspect");
|
aspect = (TopsyTurvyAspect) ctx.getBean("topsyTurvyAspect");
|
||||||
target = (TopsyTurvyTarget) ctx.getBean("topsyTurvyTarget");
|
target = (TopsyTurvyTarget) ctx.getBean("topsyTurvyTarget");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ public class DeclareParentsDelegateRefTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("declare-parents-delegate-ref-tests.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
noMethodsBean = (NoMethodsBean) ctx.getBean("noMethodsBean");
|
noMethodsBean = (NoMethodsBean) ctx.getBean("noMethodsBean");
|
||||||
counter = (Counter) ctx.getBean("counter");
|
counter = (Counter) ctx.getBean("counter");
|
||||||
counter.reset();
|
counter.reset();
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,9 @@ public final class DeclareParentsTests {
|
||||||
|
|
||||||
private ApplicationContext ctx;
|
private ApplicationContext ctx;
|
||||||
|
|
||||||
protected String getConfigPath() {
|
|
||||||
return "declare-parents-tests.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
ctx = new ClassPathXmlApplicationContext(getConfigPath(), getClass());
|
ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
|
|
||||||
testBeanProxy = (ITestBean) ctx.getBean("testBean");
|
testBeanProxy = (ITestBean) ctx.getBean("testBean");
|
||||||
assertTrue(AopUtils.isAopProxy(testBeanProxy));
|
assertTrue(AopUtils.isAopProxy(testBeanProxy));
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public final class ImplicitJPArgumentMatchingAtAspectJTests {
|
||||||
@Test
|
@Test
|
||||||
public void testAspect() {
|
public void testAspect() {
|
||||||
// nothing to really test; it is enough if we don't get error while creating app context
|
// nothing to really test; it is enough if we don't get error while creating app context
|
||||||
new ClassPathXmlApplicationContext("implicit-jp-argument-matching-atAspectJ-tests.xml", getClass());
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Aspect
|
@Aspect
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public final class ImplicitJPArgumentMatchingTests {
|
||||||
@Test
|
@Test
|
||||||
public void testAspect() {
|
public void testAspect() {
|
||||||
// nothing to really test; it is enough if we don't get error while creating app context
|
// nothing to really test; it is enough if we don't get error while creating app context
|
||||||
new ClassPathXmlApplicationContext("implicit-jp-argument-matching-tests.xml", getClass());
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
static class CounterAspect {
|
static class CounterAspect {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public final class OverloadedAdviceTests {
|
||||||
@Test
|
@Test
|
||||||
public void testExceptionOnConfigParsingWithMismatchedAdviceMethod() {
|
public void testExceptionOnConfigParsingWithMismatchedAdviceMethod() {
|
||||||
try {
|
try {
|
||||||
new ClassPathXmlApplicationContext("overloaded-advice-tests.xml", getClass());
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
}
|
}
|
||||||
catch (BeanCreationException ex) {
|
catch (BeanCreationException ex) {
|
||||||
Throwable cause = ex.getRootCause();
|
Throwable cause = ex.getRootCause();
|
||||||
|
|
@ -46,7 +46,7 @@ public final class OverloadedAdviceTests {
|
||||||
@Test
|
@Test
|
||||||
public void testExceptionOnConfigParsingWithAmbiguousAdviceMethod() {
|
public void testExceptionOnConfigParsingWithAmbiguousAdviceMethod() {
|
||||||
try {
|
try {
|
||||||
new ClassPathXmlApplicationContext("ambiguous-advice-tests.xml", getClass());
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-ambiguous.xml", getClass());
|
||||||
}
|
}
|
||||||
catch (BeanCreationException ex) {
|
catch (BeanCreationException ex) {
|
||||||
Throwable cause = ex.getRootCause();
|
Throwable cause = ex.getRootCause();
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public final class ProceedTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("proceedTests.xml", getClass());
|
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("proceedTests_.xml", getClass());
|
||||||
testBean = (SimpleBean) ctx.getBean("testBean");
|
testBean = (SimpleBean) ctx.getBean("testBean");
|
||||||
firstTestAspect = (ProceedTestingAspect) ctx.getBean("firstTestAspect");
|
firstTestAspect = (ProceedTestingAspect) ctx.getBean("firstTestAspect");
|
||||||
secondTestAspect = (ProceedTestingAspect) ctx.getBean("secondTestAspect");
|
secondTestAspect = (ProceedTestingAspect) ctx.getBean("secondTestAspect");
|
||||||
|
|
|
||||||
|
|
@ -39,26 +39,26 @@ public final class PropertyDependentAspectTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPropertyDependentAspectWithPropertyDeclaredBeforeAdvice() throws Exception {
|
public void testPropertyDependentAspectWithPropertyDeclaredBeforeAdvice() throws Exception {
|
||||||
checkXmlAspect("org/springframework/aop/aspectj/property-dependent-aspect-property-before-aspect-test.xml");
|
checkXmlAspect(getClass().getSimpleName() + "-before.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPropertyDependentAspectWithPropertyDeclaredAfterAdvice() throws Exception {
|
public void testPropertyDependentAspectWithPropertyDeclaredAfterAdvice() throws Exception {
|
||||||
checkXmlAspect("org/springframework/aop/aspectj/property-dependent-aspect-property-after-aspect-test.xml");
|
checkXmlAspect(getClass().getSimpleName() + "-after.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPropertyDependentAtAspectJAspectWithPropertyDeclaredBeforeAdvice() throws Exception {
|
public void testPropertyDependentAtAspectJAspectWithPropertyDeclaredBeforeAdvice() throws Exception {
|
||||||
checkAtAspectJAspect("org/springframework/aop/aspectj/property-dependent-atAspectJ-aspect-property-before-aspect-test.xml");
|
checkAtAspectJAspect(getClass().getSimpleName() + "-atAspectJ-before.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPropertyDependentAtAspectJAspectWithPropertyDeclaredAfterAdvice() throws Exception {
|
public void testPropertyDependentAtAspectJAspectWithPropertyDeclaredAfterAdvice() throws Exception {
|
||||||
checkAtAspectJAspect("org/springframework/aop/aspectj/property-dependent-atAspectJ-aspect-property-after-aspect-test.xml");
|
checkAtAspectJAspect(getClass().getSimpleName() + "-atAspectJ-after.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkXmlAspect(String appContextFile) {
|
private void checkXmlAspect(String appContextFile) {
|
||||||
ApplicationContext context = new ClassPathXmlApplicationContext(appContextFile);
|
ApplicationContext context = new ClassPathXmlApplicationContext(appContextFile, getClass());
|
||||||
ICounter counter = (ICounter) context.getBean("counter");
|
ICounter counter = (ICounter) context.getBean("counter");
|
||||||
assertTrue("Proxy didn't get created", counter instanceof Advised);
|
assertTrue("Proxy didn't get created", counter instanceof Advised);
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ public final class PropertyDependentAspectTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkAtAspectJAspect(String appContextFile) {
|
private void checkAtAspectJAspect(String appContextFile) {
|
||||||
ApplicationContext context = new ClassPathXmlApplicationContext(appContextFile);
|
ApplicationContext context = new ClassPathXmlApplicationContext(appContextFile, getClass());
|
||||||
ICounter counter = (ICounter) context.getBean("counter");
|
ICounter counter = (ICounter) context.getBean("counter");
|
||||||
assertTrue("Proxy didn't get created", counter instanceof Advised);
|
assertTrue("Proxy didn't get created", counter instanceof Advised);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ public final class SharedPointcutWithArgsMismatchTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("args-mismatch.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
toBeAdvised = (ToBeAdvised) ctx.getBean("toBeAdvised");
|
toBeAdvised = (ToBeAdvised) ctx.getBean("toBeAdvised");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@ public final class SubtypeSensitiveMatchingTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("subtype-sensitive-matching.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
nonSerializableBean = (NonSerializableFoo) ctx.getBean("testClassA");
|
nonSerializableBean = (NonSerializableFoo) ctx.getBean("testClassA");
|
||||||
serializableBean = (SerializableFoo) ctx.getBean("testClassB");
|
serializableBean = (SerializableFoo) ctx.getBean("testClassB");
|
||||||
bar = (Bar) ctx.getBean("testClassC");
|
bar = (Bar) ctx.getBean("testClassC");
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public final class TargetPointcutSelectionTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("targetPointcutSelectionTests.xml", getClass());
|
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("targetPointcutSelectionTests_.xml", getClass());
|
||||||
testImpl1 = (TestInterface) ctx.getBean("testImpl1");
|
testImpl1 = (TestInterface) ctx.getBean("testImpl1");
|
||||||
testImpl2 = (TestInterface) ctx.getBean("testImpl2");
|
testImpl2 = (TestInterface) ctx.getBean("testImpl2");
|
||||||
testAspectForTestImpl1 = (TestAspect) ctx.getBean("testAspectForTestImpl1");
|
testAspectForTestImpl1 = (TestAspect) ctx.getBean("testAspectForTestImpl1");
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests {
|
||||||
|
|
||||||
@org.junit.Before
|
@org.junit.Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("this-and-target-selectionOnly-pointcuts-atAspectJ-tests.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
testBean = (TestInterface) ctx.getBean("testBean");
|
testBean = (TestInterface) ctx.getBean("testBean");
|
||||||
testAnnotatedClassBean = (TestInterface) ctx.getBean("testAnnotatedClassBean");
|
testAnnotatedClassBean = (TestInterface) ctx.getBean("testAnnotatedClassBean");
|
||||||
testAnnotatedMethodBean = (TestInterface) ctx.getBean("testAnnotatedMethodBean");
|
testAnnotatedMethodBean = (TestInterface) ctx.getBean("testAnnotatedMethodBean");
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@ public final class ThisAndTargetSelectionOnlyPointcutsTests {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("this-and-target-selectionOnly-pointcuts-tests.xml", getClass());
|
ClassPathXmlApplicationContext ctx =
|
||||||
|
new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass());
|
||||||
|
|
||||||
testBean = (TestInterface) ctx.getBean("testBean");
|
testBean = (TestInterface) ctx.getBean("testBean");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue