Ejemplo n.º 1
0
  @Test
  public void shouldPublishStackPersistedEventAfterStackIsPersisted() throws Exception {
    final boolean[] isNotified = new boolean[] {false};
    eventService.subscribe(event -> isNotified[0] = true, StackPersistedEvent.class);

    stackDao.create(createStack("test", "test"));

    assertTrue(isNotified[0], "Event subscriber notified");
  }
 @PostConstruct
 void start() {
   eventService.subscribe(projectCreatedEventSubscriber);
 }
Ejemplo n.º 3
0
 @PostConstruct
 public void subscribe() {
   eventService.subscribe(this, BeforeUserRemovedEvent.class);
 }