BAEL-3180: Simplify spring-aop tests

This commit is contained in:
Krzysiek 2019-12-28 22:34:21 +01:00
parent 17dc359d5b
commit 531b01ec86
6 changed files with 59 additions and 71 deletions

View File

@ -6,7 +6,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}

View File

@ -1,11 +0,0 @@
package com.baeldung;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@Configuration
@ComponentScan(basePackages = { "com.baeldung.pointcutadvice" })
@EnableAspectJAutoProxy
public class TestConfig {
}

View File

@ -1,6 +1,6 @@
package com.baeldung.pointcutadvice;
import com.baeldung.TestConfig;
import com.baeldung.Application;
import com.baeldung.pointcutadvice.dao.FooDao;
import org.junit.Before;
import org.junit.Test;
@ -23,7 +23,7 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {TestConfig.class}, loader = AnnotationConfigContextLoader.class)
@ContextConfiguration(classes = {Application.class}, loader = AnnotationConfigContextLoader.class)
public class AopLoggingIntegrationTest {
@Before

View File

@ -1,6 +1,6 @@
package com.baeldung.pointcutadvice;
import com.baeldung.TestConfig;
import com.baeldung.Application;
import com.baeldung.pointcutadvice.dao.FooDao;
import org.junit.Before;
import org.junit.Test;
@ -23,7 +23,7 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { TestConfig.class }, loader = AnnotationConfigContextLoader.class)
@ContextConfiguration(classes = {Application.class}, loader = AnnotationConfigContextLoader.class)
public class AopPerformanceIntegrationTest {
@Before

View File

@ -1,6 +1,6 @@
package com.baeldung.pointcutadvice;
import com.baeldung.TestConfig;
import com.baeldung.Application;
import com.baeldung.pointcutadvice.dao.FooDao;
import com.baeldung.pointcutadvice.events.FooCreationEventListener;
import org.junit.Before;
@ -21,7 +21,7 @@ import java.util.regex.Pattern;
import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {TestConfig.class}, loader = AnnotationConfigContextLoader.class)
@ContextConfiguration(classes = {Application.class}, loader = AnnotationConfigContextLoader.class)
public class AopPublishingIntegrationTest {
@Before