Search in sources :

Example 1 with FailureBus

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());
}
Also used : FailureBus(io.spine.server.failure.FailureBus) TenantAwareTest(io.spine.server.tenant.TenantAwareTest) Test(org.junit.Test)

Example 2 with FailureBus

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);
}
Also used : CommandBus(io.spine.server.commandbus.CommandBus) FailureBus(io.spine.server.failure.FailureBus) Test(org.junit.Test)

Aggregations

FailureBus (io.spine.server.failure.FailureBus)2 Test (org.junit.Test)2 CommandBus (io.spine.server.commandbus.CommandBus)1 TenantAwareTest (io.spine.server.tenant.TenantAwareTest)1