-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Development: Refactor file upload tests (#9415)
- Loading branch information
1 parent
2e5ebe5
commit a0f7fd8
Showing
5 changed files
with
102 additions
and
106 deletions.
There are no files selected for viewing
81 changes: 81 additions & 0 deletions
81
src/test/java/de/tum/cit/aet/artemis/fileupload/AbstractFileUploadIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package de.tum.cit.aet.artemis.fileupload; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
import de.tum.cit.aet.artemis.assessment.repository.ComplaintRepository; | ||
import de.tum.cit.aet.artemis.assessment.repository.FeedbackRepository; | ||
import de.tum.cit.aet.artemis.assessment.repository.GradingCriterionRepository; | ||
import de.tum.cit.aet.artemis.assessment.util.ComplaintUtilService; | ||
import de.tum.cit.aet.artemis.atlas.competency.util.CompetencyUtilService; | ||
import de.tum.cit.aet.artemis.communication.repository.conversation.ChannelRepository; | ||
import de.tum.cit.aet.artemis.core.util.PageableSearchUtilService; | ||
import de.tum.cit.aet.artemis.exam.repository.ExamRepository; | ||
import de.tum.cit.aet.artemis.exam.util.ExamUtilService; | ||
import de.tum.cit.aet.artemis.exercise.participation.util.ParticipationUtilService; | ||
import de.tum.cit.aet.artemis.exercise.test_repository.ParticipationTestRepository; | ||
import de.tum.cit.aet.artemis.exercise.test_repository.StudentParticipationTestRepository; | ||
import de.tum.cit.aet.artemis.exercise.test_repository.SubmissionTestRepository; | ||
import de.tum.cit.aet.artemis.fileupload.repository.FileUploadExerciseRepository; | ||
import de.tum.cit.aet.artemis.fileupload.repository.FileUploadSubmissionRepository; | ||
import de.tum.cit.aet.artemis.fileupload.util.FileUploadExerciseUtilService; | ||
import de.tum.cit.aet.artemis.modeling.util.ModelingExerciseUtilService; | ||
import de.tum.cit.aet.artemis.shared.base.AbstractSpringIntegrationIndependentTest; | ||
|
||
public class AbstractFileUploadIntegrationTest extends AbstractSpringIntegrationIndependentTest { | ||
|
||
// Repositories | ||
@Autowired | ||
protected FileUploadExerciseRepository fileUploadExerciseRepository; | ||
|
||
// External Repositories | ||
@Autowired | ||
protected ComplaintRepository complaintRepository; | ||
|
||
@Autowired | ||
protected SubmissionTestRepository submissionRepository; | ||
|
||
@Autowired | ||
protected ExamRepository examRepository; | ||
|
||
@Autowired | ||
protected StudentParticipationTestRepository studentParticipationRepository; | ||
|
||
@Autowired | ||
protected FeedbackRepository feedbackRepository; | ||
|
||
@Autowired | ||
protected GradingCriterionRepository gradingCriterionRepository; | ||
|
||
@Autowired | ||
protected ChannelRepository channelRepository; | ||
|
||
@Autowired | ||
protected ParticipationTestRepository participationRepository; | ||
|
||
// Services | ||
@Autowired | ||
protected FileUploadSubmissionRepository fileUploadSubmissionRepository; | ||
|
||
// Util Services | ||
@Autowired | ||
protected FileUploadExerciseUtilService fileUploadExerciseUtilService; | ||
|
||
// External Util Services | ||
@Autowired | ||
protected ParticipationUtilService participationUtilService; | ||
|
||
@Autowired | ||
protected ExamUtilService examUtilService; | ||
|
||
@Autowired | ||
protected ComplaintUtilService complaintUtilService; | ||
|
||
@Autowired | ||
protected PageableSearchUtilService pageableSearchUtilService; | ||
|
||
@Autowired | ||
protected CompetencyUtilService competencyUtilService; | ||
|
||
@Autowired | ||
protected ModelingExerciseUtilService modelingExerciseUtilService; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...t/java/de/tum/cit/aet/artemis/fileupload/architecture/FileUploadTestArchitectureTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package de.tum.cit.aet.artemis.fileupload.architecture; | ||
|
||
import de.tum.cit.aet.artemis.fileupload.AbstractFileUploadIntegrationTest; | ||
import de.tum.cit.aet.artemis.shared.architecture.module.AbstractModuleTestArchitectureTest; | ||
|
||
class FileUploadTestArchitectureTest extends AbstractModuleTestArchitectureTest<AbstractFileUploadIntegrationTest> { | ||
|
||
@Override | ||
public String getModulePackage() { | ||
return ARTEMIS_PACKAGE + ".fileupload"; | ||
} | ||
|
||
@Override | ||
protected Class<AbstractFileUploadIntegrationTest> getAbstractModuleIntegrationTestClass() { | ||
return AbstractFileUploadIntegrationTest.class; | ||
} | ||
} |