general formatting work
This commit is contained in:
@@ -24,12 +24,12 @@ import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {TestConfig.class}, loader = AnnotationConfigContextLoader.class)
|
||||
@ContextConfiguration(classes = { TestConfig.class }, loader = AnnotationConfigContextLoader.class)
|
||||
public class AopLoggingTest {
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
messages = new ArrayList<>();
|
||||
messages = new ArrayList<>();
|
||||
|
||||
logEventHandler = new Handler() {
|
||||
@Override
|
||||
|
||||
@@ -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 = { TestConfig.class }, loader = AnnotationConfigContextLoader.class)
|
||||
public class AopPerformanceTest {
|
||||
|
||||
@Before
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.regex.Pattern;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {TestConfig.class}, loader = AnnotationConfigContextLoader.class)
|
||||
@ContextConfiguration(classes = { TestConfig.class }, loader = AnnotationConfigContextLoader.class)
|
||||
public class AopPublishingTest {
|
||||
|
||||
@Before
|
||||
@@ -60,8 +60,7 @@ public class AopPublishingTest {
|
||||
dao.create(1L, "Bar");
|
||||
|
||||
String logMessage = messages.get(0);
|
||||
Pattern pattern = Pattern.compile("Created foo instance: " +
|
||||
Pattern.quote(new Foo(1L, "Bar").toString()));
|
||||
Pattern pattern = Pattern.compile("Created foo instance: " + Pattern.quote(new Foo(1L, "Bar").toString()));
|
||||
assertTrue(pattern.matcher(logMessage).matches());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = {"org.baeldung.dao", "org.baeldung.aop", "org.baeldung.events"})
|
||||
@ComponentScan(basePackages = { "org.baeldung.dao", "org.baeldung.aop", "org.baeldung.events" })
|
||||
@EnableAspectJAutoProxy
|
||||
public class TestConfig {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user