Merge pull request #8447 from kwoyke/BAEL-3180-2

BAEL-3180: Simplify spring-aop tests
This commit is contained in:
Loredana Crusoveanu 2020-01-01 15:29:39 +02:00 committed by GitHub
commit 4b68618684
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