yyqdbngt opened a new pull request, #3532:
URL: https://github.com/apache/rocketmq-dashboard/pull/3532
### Summary
Adds the first dedicated unit test suite for `UpdateAclUserDTO`, the
partial-update payload of the ACL user endpoint.
Besides the required `id`, the DTO carries a nullable `admin` flag whose
semantics matter: an omitted flag must preserve the existing value instead of
resetting it to `false`. The tests pin down the required-field rule, the
numeric id parsing and the null-aware admin handling.
### Changes
-
`server/src/test/java/org/apache/rocketmq/studio/instance/acl/UpdateAclUserDTOTest.java`
- `acceptsCompletePayload`: a fully populated payload passes validation.
- `rejectsMissingId`: null `id` yields the `id is required` violation.
- `mapsNumericIdToLong`: numeric id is parsed to `Long` and all fields map
to `AclUserVO`.
- `mapsNonNumericIdToNull`: non-numeric id maps to a null VO id instead of
throwing.
- `treatsNullAdminAsNotAdmin`: a partial update without the admin flag
produces `false` in the VO.
### Testing
- `mvn -B test -Dtest=UpdateAclUserDTOTest` passes (5 tests, all green).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]