use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class AggregateRootShould method pass_null_tolerance_test.
@Test
public void pass_null_tolerance_test() throws NoSuchMethodException {
final Constructor<AnAggregateRoot> ctor = AnAggregateRoot.class.getDeclaredConstructor(BoundedContext.class, String.class);
new NullPointerTester().setDefault(Constructor.class, ctor).setDefault(BoundedContext.class, boundedContext).testStaticMethods(AggregateRoot.class, NullPointerTester.Visibility.PACKAGE);
}
use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class AggregateCommandEndpointShould method setUp.
@Before
public void setUp() {
projectId = ProjectId.newBuilder().setId(Identifiers.newUuid()).build();
final CommandStore commandStore = mock(CommandStore.class);
final CommandBus.Builder commandBus = CommandBus.newBuilder().setMultitenant(true).setCommandStore(commandStore);
final BoundedContext boundedContext = newBoundedContext(commandBus);
subscriber = new Subscriber();
boundedContext.getEventBus().register(subscriber);
repository = new ProjectAggregateRepository(boundedContext);
repositorySpy = spy(repository);
}
use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class AggregatePartShould method createNullPointerTester.
private NullPointerTester createNullPointerTester() throws NoSuchMethodException {
final Constructor constructor = AnAggregateRoot.class.getDeclaredConstructor(BoundedContext.class, String.class);
final NullPointerTester tester = new NullPointerTester();
tester.setDefault(Constructor.class, constructor).setDefault(BoundedContext.class, boundedContext).setDefault(AggregateRoot.class, root);
return tester;
}
use of io.spine.server.BoundedContext in project core-java by SpineEventEngine.
the class AggregateRepositoryShould method setUp.
@Before
public void setUp() {
final BoundedContext boundedContext = BoundedContext.newBuilder().build();
repository = new ProjectAggregateRepository(boundedContext);
repositorySpy = spy(repository);
}
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();
repository = new TestRepository(bc);
bc.register(repository);
}
Aggregations