Search in sources :

Example 1 with AnotherProjectAggregateRepository

use of io.spine.server.bc.given.BoundedContextTestEnv.AnotherProjectAggregateRepository in project core-java by SpineEventEngine.

the class BoundedContextShould method not_allow_two_aggregate_repositories_with_aggregates_with_the_same_state.

@Test(expected = IllegalStateException.class)
public void not_allow_two_aggregate_repositories_with_aggregates_with_the_same_state() {
    final ProjectAggregateRepository repository = new ProjectAggregateRepository();
    boundedContext.register(repository);
    final AnotherProjectAggregateRepository anotherRepo = new AnotherProjectAggregateRepository();
    boundedContext.register(anotherRepo);
}
Also used : AnotherProjectAggregateRepository(io.spine.server.bc.given.BoundedContextTestEnv.AnotherProjectAggregateRepository) ProjectAggregateRepository(io.spine.server.bc.given.BoundedContextTestEnv.ProjectAggregateRepository) AnotherProjectAggregateRepository(io.spine.server.bc.given.BoundedContextTestEnv.AnotherProjectAggregateRepository) Test(org.junit.Test)

Aggregations

AnotherProjectAggregateRepository (io.spine.server.bc.given.BoundedContextTestEnv.AnotherProjectAggregateRepository)1 ProjectAggregateRepository (io.spine.server.bc.given.BoundedContextTestEnv.ProjectAggregateRepository)1 Test (org.junit.Test)1