BAEL-3715: Sync code and article (#9932)

This commit is contained in:
kwoyke
2020-08-29 10:49:40 +02:00
committed by GitHub
parent dcec5a83a8
commit e2ab279ebb
3 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ public class CustomSpringEventPublisher {
@Autowired
private ApplicationEventPublisher applicationEventPublisher;
public void publishEvent(final String message) {
public void publishCustomEvent(final String message) {
System.out.println("Publishing custom event. ");
final CustomSpringEvent customSpringEvent = new CustomSpringEvent(this, message);
applicationEventPublisher.publishEvent(customSpringEvent);

View File

@@ -17,7 +17,7 @@ public class AsynchronousCustomSpringEventsIntegrationTest {
@Test
public void testCustomSpringEvents() throws InterruptedException {
publisher.publishEvent("Hello world!!");
publisher.publishCustomEvent("Hello world!!");
System.out.println("Done publishing asynchronous custom event. ");
}
}

View File

@@ -22,7 +22,7 @@ public class SynchronousCustomSpringEventsIntegrationTest {
@Test
public void testCustomSpringEvents() {
isTrue(!listener.isHitCustomEventHandler(), "The value should be false");
publisher.publishEvent("Hello world!!");
publisher.publishCustomEvent("Hello world!!");
System.out.println("Done publishing synchronous custom event. ");
isTrue(listener.isHitCustomEventHandler(), "Now the value should be changed to true");
}