use of org.pmiops.workbench.model.MaterializeCohortRequest in project workbench by all-of-us.
the class CohortMaterializationServiceTest method testMaterializeCohortWithReviewNotExcludedFilter.
@Test
public void testMaterializeCohortWithReviewNotExcludedFilter() {
MaterializeCohortRequest request = makeRequest(2);
request.setStatusFilter(ImmutableList.of(CohortStatus.NOT_REVIEWED, CohortStatus.INCLUDED, CohortStatus.NEEDS_FURTHER_REVIEW));
MaterializeCohortResponse response = cohortMaterializationService.materializeCohort(cohortReview, SearchRequests.allGenders(), request);
// With a not excluded status filter, ID 2 is not returned.
assertPersonIds(response, 1L, 102246L);
assertThat(response.getNextPageToken()).isNull();
}
use of org.pmiops.workbench.model.MaterializeCohortRequest in project workbench by all-of-us.
the class CohortMaterializationServiceTest method testMaterializeCohortWithReviewJustExcludedFilter.
@Test
public void testMaterializeCohortWithReviewJustExcludedFilter() {
MaterializeCohortRequest request = makeRequest(2);
request.setStatusFilter(ImmutableList.of(CohortStatus.EXCLUDED));
MaterializeCohortResponse response = cohortMaterializationService.materializeCohort(cohortReview, SearchRequests.allGenders(), request);
assertPersonIds(response, 2L);
assertThat(response.getNextPageToken()).isNull();
}
use of org.pmiops.workbench.model.MaterializeCohortRequest in project workbench by all-of-us.
the class CohortMaterializationServiceTest method makeRequest.
private MaterializeCohortRequest makeRequest(FieldSet fieldSet, int pageSize) {
MaterializeCohortRequest request = makeRequest(pageSize);
request.setFieldSet(fieldSet);
return request;
}
use of org.pmiops.workbench.model.MaterializeCohortRequest in project workbench by all-of-us.
the class CohortMaterializationServiceTest method makeRequest.
private MaterializeCohortRequest makeRequest(int pageSize) {
MaterializeCohortRequest request = new MaterializeCohortRequest();
request.setPageSize(pageSize);
return request;
}
use of org.pmiops.workbench.model.MaterializeCohortRequest in project workbench by all-of-us.
the class CohortMaterializationServiceTest method testMaterializeCohortWithReviewNotReviewedAndNeedsFurtherReviewFilter.
@Test
public void testMaterializeCohortWithReviewNotReviewedAndNeedsFurtherReviewFilter() {
MaterializeCohortRequest request = makeRequest(2);
request.setStatusFilter(ImmutableList.of(CohortStatus.NEEDS_FURTHER_REVIEW, CohortStatus.NOT_REVIEWED));
MaterializeCohortResponse response = cohortMaterializationService.materializeCohort(cohortReview, SearchRequests.allGenders(), request);
assertPersonIds(response, 102246L);
assertThat(response.getNextPageToken()).isNull();
}
Aggregations