use of de.tum.in.www1.artemis.domain.ModelingSubmission in project ArTEMiS by ls1intum.
the class ModelingSubmissionResourceIntTest method createModelingSubmission.
@Test
@Transactional
public void createModelingSubmission() throws Exception {
int databaseSizeBeforeCreate = modelingSubmissionRepository.findAll().size();
// Create the ModelingSubmission
restModelingSubmissionMockMvc.perform(post("/api/modeling-submissions").contentType(TestUtil.APPLICATION_JSON_UTF8).content(TestUtil.convertObjectToJsonBytes(modelingSubmission))).andExpect(status().isCreated());
// Validate the ModelingSubmission in the database
List<ModelingSubmission> modelingSubmissionList = modelingSubmissionRepository.findAll();
assertThat(modelingSubmissionList).hasSize(databaseSizeBeforeCreate + 1);
ModelingSubmission testModelingSubmission = modelingSubmissionList.get(modelingSubmissionList.size() - 1);
assertThat(testModelingSubmission.getSubmissionPath()).isEqualTo(DEFAULT_SUBMISSION_PATH);
}
Aggregations