As a user, I want to be able to log into the application using my email and password. If my credentials are correct, I should be granted access to my account. If there's an issue with the credentials, I should receive appropriate error messages.
Task
[x] Implement Data Access Object (DAO) Layer.
[x] Implement Service Layer.
[x] Create JUnit Test Cases.
[x] Ensure that the tests cases are passing.
[ ] Write clear and concise comments in the code to explain complex logic.
DAO:
[x] findUserByEmail()
Service:
[x] loginUser()
Test:
[x] testLoginSuccess()
[x] testLoginFailed()
Flow Chart
graph TD
A[(Start)] --> B([Validate User])
B --> |Valid| C[(Retrieve Email From Database)]
B --> |Invalid| E{{Validation Exception}}
C --> |Email Not Found| F{{ServiceException}}
C --> |Email Found| D([Check Email And Password])
D --> |Fail| G([Login Failed])
D --> |Success| I([Login Successful])
E --> |Fail| G([Login Failed])
F --> |Fail| G
G --> H[(End)]
I --> H
style I fill:#dfd,stroke:#333
style G fill:#fdd,stroke:#333
User Login Process
User Story
As a user, I want to be able to log into the application using my email and password. If my credentials are correct, I should be granted access to my account. If there's an issue with the credentials, I should receive appropriate error messages.
Task
DAO:
Service:
Test:
Flow Chart