use of io.imunity.furms.domain.project_installation.ProjectUpdateJobStatus in project furms by unity-idm.
the class ProjectInstallationDatabaseRepositoryTest method shouldFindProjectUpdateJobByCommunityId.
@Test
void shouldFindProjectUpdateJobByCommunityId() {
// given
CorrelationId correlationId = new CorrelationId(UUID.randomUUID().toString());
ProjectUpdateJob request = ProjectUpdateJob.builder().correlationId(correlationId).siteId(siteId.toString()).projectId(projectId.toString()).status(ProjectUpdateStatus.PENDING).build();
// when
entityDatabaseRepository.createOrUpdate(request);
// then
Set<ProjectUpdateJobStatus> statuses = entityDatabaseRepository.findAllUpdatesByCommunityId(communityId.toString());
ProjectUpdateJobStatus status = statuses.iterator().next();
assertThat(status.status).isEqualTo(ProjectUpdateStatus.PENDING);
assertThat(status.projectId).isEqualTo(projectId.toString());
assertThat(status.siteId).isEqualTo(siteId.toString());
}
use of io.imunity.furms.domain.project_installation.ProjectUpdateJobStatus in project furms by unity-idm.
the class ProjectInstallationDatabaseRepositoryTest method shouldFindProjectUpdateJobByProjectId.
@Test
void shouldFindProjectUpdateJobByProjectId() {
// given
CorrelationId correlationId = new CorrelationId(UUID.randomUUID().toString());
ProjectUpdateJob request = ProjectUpdateJob.builder().correlationId(correlationId).siteId(siteId.toString()).projectId(projectId.toString()).status(ProjectUpdateStatus.PENDING).build();
// when
entityDatabaseRepository.createOrUpdate(request);
// then
Set<ProjectUpdateJobStatus> statuses = entityDatabaseRepository.findAllUpdatesByProjectId(projectId.toString());
ProjectUpdateJobStatus status = statuses.iterator().next();
assertThat(status.status).isEqualTo(ProjectUpdateStatus.PENDING);
assertThat(status.projectId).isEqualTo(projectId.toString());
assertThat(status.siteId).isEqualTo(siteId.toString());
}
Aggregations