Package test.controller
Class StudentRegistrationMangerTest
java.lang.Object
test.controller.StudentRegistrationMangerTest
The StudentRegistrationManagerTest class is used to test the methods of the StudentManager class that are related to
registering and deregistering a student to a project. This class tests the following methods of the StudentManager class:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method tests the deregistration of a student from a project.void
Test the deregistration of student from the projectvoid
This method tests the rejection of a student registration request.void
setUp()
This method sets up the test data by clearing all data from the repositories and creating a student and a project.void
This method tests the registration of a student to a project.
-
Constructor Details
-
StudentRegistrationMangerTest
public StudentRegistrationMangerTest()
-
-
Method Details
-
setUp
This method sets up the test data by clearing all data from the repositories and creating a student and a project. This method is run before each test method.- Throws:
ModelAlreadyExistsException
- if the model already exists in the repository.
-
testRegisterStudent
@Test @DisplayName("Register Student") public void testRegisterStudent() throws ModelNotFoundException, ModelAlreadyExistsExceptionThis method tests the registration of a student to a project. It tests the following: - The initial status of the student and the project before registration - The status of the student and the project after registration- Throws:
ModelNotFoundException
- if the model is not found in the repository.ModelAlreadyExistsException
- if the model already exists in the repository.
-
ApproveStudentRegistration
@Test @DisplayName("Approve Student Registration Request") public void ApproveStudentRegistration() throws ModelAlreadyExistsException, ModelNotFoundExceptionThis method tests the deregistration of a student from a project.- Throws:
ModelAlreadyExistsException
- if the model already exists in the repository.ModelNotFoundException
- if the model is not found in the repository.
-
RejectStudentRegistration
@Test @DisplayName("Reject Student Registration Request") public void RejectStudentRegistration() throws ModelAlreadyExistsException, ModelNotFoundExceptionThis method tests the rejection of a student registration request.- Throws:
ModelAlreadyExistsException
- if the model already exists in the repository.ModelNotFoundException
- if the model is not found in the repository.
-
deregisterStudentTest
@Test @DisplayName("Deregister Student") public void deregisterStudentTest() throws ModelAlreadyExistsException, ModelNotFoundExceptionTest the deregistration of student from the project- Throws:
ModelAlreadyExistsException
- if the model already exists in the repositoryModelNotFoundException
- if the model is not found in the repository
-