-
Hi! In assertj, I have |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @SerVB thanks for your question. No Atrium doesn't provide such methods so far but we could add it if you think it is something others could have use for as well. Until Atrium provides it out of the box (with nice error reporting and all) you can add the following extension functions:
A few questions back:
|
Beta Was this translation helpful? Give feedback.
-
I see, you take another approach than Atrium (and also assertJ IMO) is made for.
In theory you don't even need With the above you make sure your Comparable implementation aligns with |
Beta Was this translation helpful? Give feedback.
I see, you take another approach than Atrium (and also assertJ IMO) is made for.
The subject of the expectation (i.e.
expect(x)
=> x = subject) should be the result of an operation and not the values you expect.I think you should take a data driven approach to test your comparable and not only rely on a long list. Much easier to understand your tests and also covers more checks would be something like: