My test
assertReflectionEquals(expectedDto, dtoMapper.toDto(actual), LENIENT_ORDER);
Both objects are same DTOs without strings instead of enums (!).
paymentTypes expected: [CASH, ON_CREDIT_CARD]
paymentTypes actual: ["ON_CREDIT_CARD", "CASH"]
paymentTypes[0,0] expected: CASH
paymentTypes[0,0] actual: "ON_CREDIT_CARD"
paymentTypes[1,0] expected: ON_CREDIT_CARD
paymentTypes[1,0] actual: "ON_CREDIT_CARD"
- How to use LENIENT_ORDER for inner fields?
- Why it compares actual as strings?
question from:
https://stackoverflow.com/questions/65909494/how-to-use-org-unitils-reflectionassert-for-unsorted-enums 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…