use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class ProcessManagerShould method create_iterating_router.
@Test
public void create_iterating_router() {
final StringValue commandMessage = Wrapper.forString("create_iterating_router");
final CommandContext commandContext = requestFactory.createCommandContext();
processManager.setCommandBus(mock(CommandBus.class));
final IteratingCommandRouter router = processManager.newIteratingRouterFor(commandMessage, commandContext);
assertNotNull(router);
assertEquals(commandMessage, getMessage(router.getSource()));
assertEquals(commandContext, router.getSource().getContext());
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class InvalidEventExceptionShould method create_exception_with_violations.
@Test
public void create_exception_with_violations() {
final StringValue msg = Wrapper.forString("");
final InvalidEventException exception = InvalidEventException.onConstraintViolations(msg, singletonList(ConstraintViolation.getDefaultInstance()));
assertNotNull(exception.getMessage());
assertNotNull(exception.getError());
assertEquals(msg, exception.getEventMessage());
}
Aggregations