@Test public void unsatisfiedWhenRepositoryIsOutOfService() { assertThat(underTest.isSatisfied(), is(true)); when(configuration.isOnline()).thenReturn(false); underTest.handle(new RepositoryUpdatedEvent(repository, null)); assertThat(underTest.isSatisfied(), is(false)); verifyEventManagerEvents(satisfied(underTest), unsatisfied(underTest)); }
@Override @AllowConcurrentEvents @Subscribe public void handle(final RepositoryCreatedEvent event) { if (sameRepositoryAs(event.getRepository().getName())) { setSatisfied(event.getRepository().getConfiguration().isOnline()); } }
RepositoryOnlineCondition extends RepositoryConditionSupport { @Override @AllowConcurrentEvents @Subscribe public void handle(final RepositoryCreatedEvent event) { if (sameRepositoryAs(event.getRepository().getName())) { setSatisfied(event.getRepository().getConfiguration().isOnline()); } } }
RepositoryOnlineCondition extends RepositoryConditionSupport { @Override @AllowConcurrentEvents @Subscribe public void handle(final RepositoryCreatedEvent event) { if (sameRepositoryAs(event.getRepository().getName())) { setSatisfied(event.getRepository().getConfiguration().isOnline()); } } RepositoryOnlineCondition(final EventManager eventManager,
                                   final RepositoryManager repositoryManager,
                                   final Supplier<String> repositoryName); }
RepositoryOnlineCondition extends RepositoryConditionSupport { @Override @AllowConcurrentEvents @Subscribe public void handle(final RepositoryCreatedEvent event) { if (sameRepositoryAs(event.getRepository().getName())) { setSatisfied(event.getRepository().getConfiguration().isOnline()); } } RepositoryOnlineCondition(final EventManager eventManager,
                                   final RepositoryManager repositoryManager,
                                   final Supplier<String> repositoryName); @Override @AllowConcurrentEvents @Subscribe void handle(final RepositoryCreatedEvent event); @AllowConcurrentEvents @Subscribe void handle(final RepositoryUpdatedEvent event); @AllowConcurrentEvents @Subscribe void handle(final RepositoryDeletedEvent event); @Override String toString(); @Override String explainSatisfied(); @Override String explainUnsatisfied(); }
RepositoryOnlineCondition extends RepositoryConditionSupport { @Override @AllowConcurrentEvents @Subscribe public void handle(final RepositoryCreatedEvent event) { if (sameRepositoryAs(event.getRepository().getName())) { setSatisfied(event.getRepository().getConfiguration().isOnline()); } } RepositoryOnlineCondition(final EventManager eventManager,
                                   final RepositoryManager repositoryManager,
                                   final Supplier<String> repositoryName); @Override @AllowConcurrentEvents @Subscribe void handle(final RepositoryCreatedEvent event); @AllowConcurrentEvents @Subscribe void handle(final RepositoryUpdatedEvent event); @AllowConcurrentEvents @Subscribe void handle(final RepositoryDeletedEvent event); @Override String toString(); @Override String explainSatisfied(); @Override String explainUnsatisfied();  }