use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class BoundedContextBuilderShould method create_CommandBus_if_it_was_not_set.
@Test
public void create_CommandBus_if_it_was_not_set() {
// Pass EventBus to builder initialization, and do NOT pass CommandBus.
final BoundedContext boundedContext = builder.setEventBus(EventBus.newBuilder()).build();
assertNotNull(boundedContext.getCommandBus());
}
use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class BoundedContextShould method tell_if_set_multitenant.
@Test
public void tell_if_set_multitenant() {
final BoundedContext bc = BoundedContext.newBuilder().setMultitenant(true).build();
assertTrue(bc.isMultitenant());
}
use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class BoundedContextShould method set_multi_tenancy_in_CommandBus.
@Test
public void set_multi_tenancy_in_CommandBus() {
BoundedContext bc = BoundedContext.newBuilder().setMultitenant(true).build();
assertEquals(bc.isMultitenant(), bc.getCommandBus().isMultitenant());
bc = BoundedContext.newBuilder().setMultitenant(false).build();
assertEquals(bc.isMultitenant(), bc.getCommandBus().isMultitenant());
}
use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class DefaultEntityStorageConverterShould method setUp.
@Before
public void setUp() {
final BoundedContext bc = BoundedContext.newBuilder().build();
RecordBasedRepository<Long, TestEntity, StringValue> repository = new TestRepository();
bc.register(repository);
final TypeUrl stateType = repository.entityClass().getStateType();
converter = forAllFields(stateType, repository.entityFactory());
}
use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class AggregatePartClassShould method setUp.
@Before
public void setUp() {
ModelTests.clearModel();
final BoundedContext boundedContext = BoundedContext.newBuilder().build();
root = new AnAggregateRoot(boundedContext, newUuid());
}
Aggregations