use of io.spine.test.procman.command.AddTask in project core-java by SpineEventEngine.
the class ProcessManagerRepositoryShould method setUp.
@Override
@Before
public void setUp() {
super.setUp();
boundedContext = TestBoundedContextFactory.MultiTenant.newBoundedContext();
boundedContext.getCommandBus().register(new CommandDispatcher() {
@Override
public Set<CommandClass> getMessageClasses() {
return CommandClass.setOf(AddTask.class);
}
@Override
public void dispatch(CommandEnvelope envelope) {
/* Simply swallow the command. We need this dispatcher for allowing
Process Manager under test to route the AddTask command. */
}
});
repository = new TestProcessManagerRepository(boundedContext);
repository.initStorage(storageFactory());
TestProcessManager.clearMessageDeliveryHistory();
}
Aggregations