-
Type: Improvement
-
Status: Done
-
Priority: High
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 1.17.0
-
Component/s: appng-testsupport
-
Labels:None
The WritingJsonValidator can compare an object against json content saved in a file. Unfortunately the order of attributes are not clear defined on serialization. Changing code in the project maybe leads to a different order of attributes.
This causes test errors even if the test result didn't change because the order of attributes in the json content is different.
By adding
objectMapper.configure(SerializationConfig.Feature.SORT_PROPERTIES_ALPHABETICALLY, true);
The order will always be the same.
To prevent that this new behavior will lead to test fails, this functionality should be configurable either by additional method or by static attribute like the boolean WritingJsonValidator.writeJson