use of io.spine.test.failure.ProjectId in project core-java by SpineEventEngine.
the class FailureBusShould method invalidProjectNameFailure.
private static Failure invalidProjectNameFailure() {
final ProjectId projectId = ProjectId.newBuilder().setId(newUuid()).build();
final ProjectFailures.InvalidProjectName invalidProjectName = ProjectFailures.InvalidProjectName.newBuilder().setProjectId(projectId).build();
final StringChange nameChange = StringChange.newBuilder().setNewValue("Too short").build();
final UpdateProjectName updateProjectName = UpdateProjectName.newBuilder().setId(projectId).setNameUpdate(nameChange).build();
final TenantId generatedTenantId = TenantId.newBuilder().setValue(newUuid()).build();
final TestActorRequestFactory factory = TestActorRequestFactory.newInstance(FailureBusShould.class, generatedTenantId);
final Command command = factory.createCommand(updateProjectName);
return Failures.createFailure(invalidProjectName, command);
}
Aggregations