Recursive SamePropertyValuesA How to combine in hamcrest

I'm looking for a hamcrest match, which behaves the same as SamePropertyValuesAs , but with an added twist, which, if the property is not primitive, is one of the standard Java classes (string, integer, etc.) or a mix of one of them (collection or an array), then it will also perform a recursive match with these properties.

Is there such an assistant or do I have to roll on my own?

+4
source share
1 answer

Now the main problem can be solved by a library written by engineers in Shazam (where I work). This is a bean comparison library called Shazamcrest.

It is very powerful and generates a very nice diagnosis.

https://github.com/shazam/shazamcrest

+7
source

Source: https://habr.com/ru/post/1393463/


All Articles