use of io.spine.server.bc.given.BoundedContextTestEnv.ProjectAggregateRepository in project core-java by SpineEventEngine.
the class BoundedContextShould method assign_storage_during_registration_if_repository_does_not_have_storage.
@Test
public void assign_storage_during_registration_if_repository_does_not_have_storage() {
final ProjectAggregateRepository repository = new ProjectAggregateRepository();
boundedContext.register(repository);
assertTrue(repository.isStorageAssigned());
}
use of io.spine.server.bc.given.BoundedContextTestEnv.ProjectAggregateRepository in project core-java by SpineEventEngine.
the class BoundedContextShould method propagate_registered_repositories_to_stand.
@Test
public void propagate_registered_repositories_to_stand() {
final BoundedContext boundedContext = BoundedContext.newBuilder().build();
final Stand stand = Spy.ofClass(Stand.class).on(boundedContext);
verify(stand, never()).registerTypeSupplier(any(Repository.class));
final ProjectAggregateRepository repository = new ProjectAggregateRepository();
boundedContext.register(repository);
verify(stand).registerTypeSupplier(eq(repository));
}
Aggregations