87: Reformat code
This commit is contained in:
parent
80694e2c14
commit
96eb62178d
45
core/src/test/java/se/su/dsv/scipro/project/split/SplitOrRestartProjectServiceIntegrationTest.java
45
core/src/test/java/se/su/dsv/scipro/project/split/SplitOrRestartProjectServiceIntegrationTest.java
@ -1,6 +1,18 @@
|
||||
package se.su.dsv.scipro.project.split;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static se.su.dsv.scipro.project.split.SplitOrRestartProjectService.SplittableStatus;
|
||||
import static se.su.dsv.scipro.project.split.SplitOrRestartProjectService.SplittableStatusRecord;
|
||||
|
||||
import jakarta.inject.Inject;
|
||||
import java.io.InputStream;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Year;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import se.su.dsv.scipro.file.FileUpload;
|
||||
@ -17,20 +29,8 @@ import se.su.dsv.scipro.system.ResearchArea;
|
||||
import se.su.dsv.scipro.system.User;
|
||||
import se.su.dsv.scipro.test.IntegrationTest;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Year;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static se.su.dsv.scipro.project.split.SplitOrRestartProjectService.SplittableStatus;
|
||||
import static se.su.dsv.scipro.project.split.SplitOrRestartProjectService.SplittableStatusRecord;
|
||||
|
||||
public class SplitOrRestartProjectServiceIntegrationTest extends IntegrationTest {
|
||||
|
||||
private static int TARGET = 3;
|
||||
private static int REMAINING_TARGET = 2;
|
||||
|
||||
@ -55,7 +55,7 @@ public class SplitOrRestartProjectServiceIntegrationTest extends IntegrationTest
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
ProjectType bachelor = save (new ProjectType(DegreeType.BACHELOR, "Bachelor", "Bachelor"));
|
||||
ProjectType bachelor = save(new ProjectType(DegreeType.BACHELOR, "Bachelor", "Bachelor"));
|
||||
|
||||
researchArea = new ResearchArea();
|
||||
researchArea.setTitle("Computer Science");
|
||||
@ -115,13 +115,15 @@ public class SplitOrRestartProjectServiceIntegrationTest extends IntegrationTest
|
||||
|
||||
splitOrRestartProjectService.splitProject(parentProject.getId());
|
||||
|
||||
ReviewerCapacityService.RemainingTargets remainingTargets = reviewerCapacityService.getRemainingTargets(reviewer, Year.now());
|
||||
assertTrue(remainingTargets.spring() == REMAINING_TARGET ||
|
||||
remainingTargets.autumn() == REMAINING_TARGET);
|
||||
ReviewerCapacityService.RemainingTargets remainingTargets = reviewerCapacityService.getRemainingTargets(
|
||||
reviewer,
|
||||
Year.now()
|
||||
);
|
||||
assertTrue(remainingTargets.spring() == REMAINING_TARGET || remainingTargets.autumn() == REMAINING_TARGET);
|
||||
|
||||
List<Project> childProjects = splitOrRestartProjectService.getChildProjects(parentProject.getId());
|
||||
|
||||
assertTrue(parentProject.getProjectStatus() ==ProjectStatus.INACTIVE);
|
||||
assertTrue(parentProject.getProjectStatus() == ProjectStatus.INACTIVE);
|
||||
assertTrue(childProjects.size() == 2);
|
||||
|
||||
childProjects.forEach(project -> {
|
||||
@ -138,8 +140,6 @@ public class SplitOrRestartProjectServiceIntegrationTest extends IntegrationTest
|
||||
|
||||
Optional<RoughDraftApproval> optional = this.roughDraftApprovalService.findBy(parentProject);
|
||||
optional.ifPresent(rda -> rda.approve("Approve", Optional.empty()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -193,7 +193,10 @@ public class SplitOrRestartProjectServiceIntegrationTest extends IntegrationTest
|
||||
roughDraftApprovalService.requestApproval(parentProject, dummyFile(), "comment");
|
||||
|
||||
reviewer = createEmployee("Lisa", "Employee", "lisa.employee@example.com", true);
|
||||
reviewerCapacityService.assignTarget(reviewer, new ReviewerCapacityService.Target(Year.now(), TARGET, TARGET, ""));
|
||||
reviewerCapacityService.assignTarget(
|
||||
reviewer,
|
||||
new ReviewerCapacityService.Target(Year.now(), TARGET, TARGET, "")
|
||||
);
|
||||
reviewerAssignmentService.assignReviewer(parentProject, reviewer);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user