BAEL-3715: Sync code and article (#9932)
This commit is contained in:
parent
fa09cd6854
commit
44d66d9a0f
|
@ -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);
|
||||
|
|
|
@ -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. ");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue