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

   ### Summary
   
   Adds the first dedicated unit test suite for `CreateInstanceDTO`, the 
payload of the instance create endpoint.
   
   The DTO is an unvalidated form object whose only behaviour is the 
`toInstanceVO()` projection. The new tests pin down that every field is carried 
into the VO and that computed counters stay at builder defaults, including the 
empty-payload path.
   
   ### Changes
   
   - 
`server/src/test/java/org/apache/rocketmq/studio/instance/CreateInstanceDTOTest.java`
     - `mapsEveryFieldToInstanceVo`: name, type, endpoint, remark, vendor, 
cloud id, credential id, admin credential ref and region id all reach the VO.
     - `leavesComputedCountersAtDefaults`: topic/group counts stay 0 and the 
resource-counts flag keeps its default.
     - `mapsEmptyPayloadWithoutNpe`: an untouched DTO maps cleanly with null 
fields.
   
   ### Testing
   
   - `mvn -B test -Dtest=CreateInstanceDTOTest` passes (3 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