Skip to content
Snippets Groups Projects
Commit 24f33cf8 authored by Danae Savvidi's avatar Danae Savvidi :laughing:
Browse files

fix errors

parent e7dd0326
Branches
No related tags found
2 merge requests!260Deploy,!242Resolve "Copy assignments to new edition"
......@@ -61,6 +61,7 @@ import nl.tudelft.submit.dto.view.labracore.SubmitAssignmentDetailsDTO;
import nl.tudelft.submit.dto.view.labracore.SubmitAssignmentSummaryDTO;
import nl.tudelft.submit.dto.view.labracore.SubmitGroupSummaryDTO;
import nl.tudelft.submit.enums.GradeImportIdType;
import nl.tudelft.submit.exception.ImportException;
import nl.tudelft.submit.model.SubmitAssignment;
import nl.tudelft.submit.repository.SubmitAssignmentRepository;
import nl.tudelft.submit.security.AuthorizationService;
......@@ -453,7 +454,7 @@ class AssignmentServiceTest {
}
@Test
void copyAssignmentsToModuleTest() throws IOException {
void copyAssignmentsToModuleTest() throws ImportException, IOException {
when(assignmentApi.getAssignmentById(anyLong())).thenReturn(Mono.just(ASSIGNMENT_MODULE));
when(fileService.getDirectory(ASSIGNMENT_ID)).thenReturn("assignment_1");
when(assignmentApi.addAssignment(any())).thenReturn(Mono.just(ASSIGNMENT_ID));
......@@ -467,7 +468,7 @@ class AssignmentServiceTest {
}
@Test
void copyAssignmentsToModuleCopiesTest() throws IOException {
void copyAssignmentsToModuleCopiesTest() throws IOException, ImportException {
when(assignmentApi.getAssignmentById(anyLong())).thenReturn(Mono.just(ASSIGNMENT_MODULE));
when(fileService.getDirectory(ASSIGNMENT_ID)).thenReturn("assignment_1");
when(assignmentApi.addAssignment(any())).thenReturn(Mono.just(ASSIGNMENT_ID));
......
......@@ -21,7 +21,6 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.*;
import java.io.IOException;
import java.util.*;
import org.junit.jupiter.api.BeforeEach;
......@@ -46,6 +45,7 @@ import nl.tudelft.submit.dto.create.ModuleCreateWithDivisionsDTO;
import nl.tudelft.submit.dto.view.GradingFormulaViewDTO;
import nl.tudelft.submit.dto.view.labracore.SubmitModuleViewDTO;
import nl.tudelft.submit.enums.DivisionsCreateType;
import nl.tudelft.submit.exception.ImportException;
import nl.tudelft.submit.model.grading.ModuleGradingFormula;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
......@@ -244,7 +244,7 @@ class ModuleServiceTest {
}
@Test
void copyModulesToEditionTest() throws IOException {
void copyModulesToEditionTest() throws ImportException {
MODULE_2.setAssignments(ASSIGNMENT_SUMMARIES);
when(moduleApi.addModule(any(ModuleCreateDTO.class))).thenReturn(Mono.just(MODULE_ID));
when(moduleApi.getModulesById(anyList())).thenReturn(Flux.just(MODULE_1, MODULE_2));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment