use of io.spine.server.entity.rejection.StandardRejections.CannotModifyDeletedEntity in project core-java by SpineEventEngine.
the class AggregateTestEnv method cannotModifyDeletedEntity.
public static RejectionEnvelope cannotModifyDeletedEntity(Class<? extends Message> commandMessageCls) {
final CannotModifyDeletedEntity rejectionMsg = CannotModifyDeletedEntity.newBuilder().build();
final Command command = io.spine.server.commandbus.Given.ACommand.withMessage(Sample.messageOfType(commandMessageCls));
final Rejection rejection = Rejections.createRejection(rejectionMsg, command);
return RejectionEnvelope.of(rejection);
}
use of io.spine.server.entity.rejection.StandardRejections.CannotModifyDeletedEntity in project core-java by SpineEventEngine.
the class Given method cannotModifyDeletedEntity.
public static Rejection cannotModifyDeletedEntity(Class<? extends Message> commandMessage) {
final ProjectId projectId = newProjectId();
final Any idAny = AnyPacker.pack(projectId);
final CannotModifyDeletedEntity rejectionMsg = CannotModifyDeletedEntity.newBuilder().setEntityId(idAny).build();
final Command command = io.spine.server.commandbus.Given.ACommand.withMessage(Sample.messageOfType(commandMessage));
return Rejections.createRejection(rejectionMsg, command);
}
Aggregations