yyqdbngt opened a new pull request, #3535:
URL: https://github.com/apache/rocketmq-dashboard/pull/3535

   ### Summary
   
   Adds the first dedicated unit test suite for `BulkToggleAlertRulesDTO`, the 
payload of the bulk enable/disable alert rule endpoint.
   
   The DTO enforces a non-empty id list capped at 100 entries, a non-null 
element inside the list and a required `enabled` flag. The tests lock in each 
of those constraints plus the boundary behaviour.
   
   ### Changes
   
   - 
`server/src/test/java/org/apache/rocketmq/studio/ops/alert/BulkToggleAlertRulesDTOTest.java`
     - `acceptsCompletePayload`: a valid id list with an enabled flag passes.
     - `rejectsMissingEnabled`: null flag yields the `enabled is required` 
violation.
     - `rejectsEmptyIds`: an empty list yields `ids are required`.
     - `rejectsNullIdInsideList`: a null element yields `rule id is required`.
     - `rejectsMoreThanHundredIds` / `acceptsExactlyHundredIds`: the 100-entry 
cap is enforced while the boundary still passes.
   
   ### Testing
   
   - `mvn -B test -Dtest=BulkToggleAlertRulesDTOTest` passes (6 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]

Reply via email to