use of io.spine.server.failure.FailureBus in project core-java by SpineEventEngine.
the class CommandBusBuilderShould method allow_to_specify_failure_bus.
@Test
public void allow_to_specify_failure_bus() {
final FailureBus expectedFailureBus = mock(FailureBus.class);
final CommandBus.Builder builder = CommandBus.newBuilder().setCommandStore(commandStore).setFailureBus(expectedFailureBus);
assertEquals(expectedFailureBus, builder.getFailureBus().get());
}
use of io.spine.server.failure.FailureBus in project core-java by SpineEventEngine.
the class MultiTenantCommandBusShould method allow_to_specify_failure_bus_via_builder.
@Test
public void allow_to_specify_failure_bus_via_builder() {
final FailureBus expectedFailureBus = mock(FailureBus.class);
final CommandBus commandBus = CommandBus.newBuilder().setCommandStore(commandStore).setFailureBus(expectedFailureBus).build();
assertNotNull(commandBus);
final FailureBus actualFailureBus = commandBus.failureBus();
assertEquals(expectedFailureBus, actualFailureBus);
}
Aggregations