mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 12:06:34 +00:00
[AZ-189] [AZ-190] [AZ-191] [AZ-192] [AZ-193] [AZ-194] [AZ-195] Add e2e blackbox test suite
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Module: Azaion.Common.Requests.RegisterUserRequest
|
||||
|
||||
## Purpose
|
||||
Request DTO and FluentValidation validator for user registration (`POST /users`).
|
||||
|
||||
## Public Interface
|
||||
|
||||
### RegisterUserRequest
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Email` | `string` | New user's email |
|
||||
| `Password` | `string` | Plaintext password |
|
||||
| `Role` | `RoleEnum` | Role to assign |
|
||||
|
||||
### RegisterUserValidator
|
||||
| Rule | Constraint | Error Code |
|
||||
|------|-----------|------------|
|
||||
| `Email` min length | >= 8 chars | `EmailLengthIncorrect` |
|
||||
| `Email` format | Valid email address | `WrongEmail` |
|
||||
| `Password` min length | >= 8 chars | `PasswordLengthIncorrect` |
|
||||
|
||||
## Internal Logic
|
||||
Validator is auto-discovered by `AddValidatorsFromAssemblyContaining<RegisterUserValidator>()` in `Program.cs`.
|
||||
|
||||
## Dependencies
|
||||
- `RoleEnum`, `ExceptionEnum` (from `BusinessException`)
|
||||
- FluentValidation
|
||||
|
||||
## Consumers
|
||||
- `Program.cs` `/users` endpoint
|
||||
- `UserService.RegisterUser`
|
||||
|
||||
## Data Models
|
||||
None.
|
||||
|
||||
## Configuration
|
||||
None.
|
||||
|
||||
## External Integrations
|
||||
None.
|
||||
|
||||
## Security
|
||||
Enforces minimum password length of 8 characters and email format validation.
|
||||
|
||||
## Tests
|
||||
None.
|
||||
Reference in New Issue
Block a user