use of com.odysseusinc.arachne.portal.model.Submission in project ArachneCentralAPI by OHDSI.
the class AnalysisHelperTest method createSubmission.
@Test
@WithUserDetails("admin@odysseusinc.com")
public void createSubmission() throws Exception {
DataSource dataSource = prepareDataSource();
when(dataSourceService.getByIdUnsecured(1L)).thenReturn(dataSource);
IUser user = prepareUser();
Study study = prepareStudy(user);
Analysis analysis = prepareAnalysis(user, study);
List<Submission> submissions = AnalysisHelper.createSubmission(submissionService, Collections.<Long>singletonList(1L), user, analysis);
try {
assertThat(submissions, is(not(empty())));
assertThat(submissions, contains(hasProperty("status", notNullValue())));
assertThat(submissions, contains(hasProperty("submissionGroup", notNullValue())));
} finally {
cleanup(submissions, analysis, study);
}
}
Aggregations