Package test.controller
Class AccountManagerTest
java.lang.Object
test.controller.AccountManagerTest
The AccountManagerTest class contains test cases for the AccountManager class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setUp()
Before all test, clear all data in the databasevoid
Test case for the login method of AccountManagervoid
Test case for the register method of AccountManager
-
Constructor Details
-
AccountManagerTest
public AccountManagerTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp()Before all test, clear all data in the database -
testRegister
@Test @DisplayName("Test Register") public void testRegister() throws ModelNotFoundException, ModelAlreadyExistsExceptionTest case for the register method of AccountManager- Throws:
ModelNotFoundException
- if the model cannot be found in the repositoryModelAlreadyExistsException
- if the model already exists in the repository
-
testLogin
@Test @DisplayName("Test Login") public void testLogin() throws PasswordIncorrectException, ModelNotFoundException, ModelAlreadyExistsExceptionTest case for the login method of AccountManager- Throws:
PasswordIncorrectException
- if the password provided is incorrectModelNotFoundException
- if the model cannot be found in the repositoryModelAlreadyExistsException
- if the model already exists in the repository
-