fssa-batch3 / fssa-batch3/sec_a_naveenasri.nagarajan__corejava_project_2
User module | Register User Feature
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## User Register Process
### User Story - Register
- User can create an account with a valid email, password, name, and phone number.
- Successful registration when all required information is provided correctly.
- Display relevant error messages for invalid or incomplete information:
- "Invalid email address" for incorrect email format.
- "Password must be at least 8 characters long and contain a mix of letters, numbers, and symbols" for weak passwords.
- "Name is required" if the name field is left blank.
- "Invalid phone number format" for incorrectly formatted phone numbers.
- After successful registration, inform the user of their registration and provide a way to log in with new credentials.
### Register Task
- [x] Implement user registration functionality in the Service Layer.
- [x] Create a Data Access Object (DAO) to save user information to the database.
- [x] Write JUnit Test Cases to verify the user registration process:
- [x] Test successful user registration.
- [x] Test registration with an invalid email format.
- [x] Test registration with a weak password.
- [x] Test registration with a missing name.
- [x] Test registration with an invalid phone number format.
- [x] Ensure that all test cases are passing successfully.
- [x] Write clear and concise comments in the code to explain any complex registration logic.
### DAO:
- [ ] createUser()
- [ ] isEmailExists()
### Service:
- [ ] registerUser()
### Test:
- [ ] testRegistrationSuccess()
- [ ] testRegistrationEmailEmpty()
- [ ] testRegistrationphonenumer()
- [ ] testRegistrationEmptyPassword()
- [ ] testRegistrationNullPassword()
- [ ] testRegistrationEmptyUsername()
- [ ] testRegistrationNullUser()
### Estimation
- [ ] 6 hrs
### Flow
```mermaid
graph TD
A[(Start)] --> B([Validate User])
B --> |Valid| C([Check Existing Active User])
B --> |Invalid| E{{Validation Exception}}
C --> |Active User Found| F{{ServiceException}}
C --> |User Not Found| D([Create User])
D --> |Success| I([Registration Successful])
E --> |Fail| G([Registration Failed])
F --> |Fail| G
G --> H[(End)]
I --> H
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.