Closed robstoll closed 4 years ago
Hm, I think it makes sense to pull some assertions on the same level, like in the example you have given.
I noticed that atrium’s reporting has a tendency to increase in indentation very rapidly. This does not always help readability, IMHO.
Additionally, I do not think that it is really a use case to teach newcomers how to compose assertions by having them read reports. I think the reports should focuse only on understandability and clarity. Newcomers learn fast by looking at existing code and docs.
So let's change that with 0.10.0, created https://github.com/robstoll/atrium/issues/299
Issue is based on https://github.com/robstoll/atrium/issues/292#issuecomment-571599350 So far I had the rational that the bullet points in the reporting should reflect the assertions a developer made. For instance
Results in
The
size
check is within thecontains only, in order
bullet point. The reason why I decided to do it this way is to guide newcomers. Having it first like this:might be confusing as it looks like one wrote:
Due to the above linked issue I mulled this concept over and following a few thoughts:
containsExactly
comprises two checks is probably easy as wellcontains, only, in order
check would be beneficial in this case as we don't have to search at all. However, this is probably a rare case and more or less neglectable.What do you think, should remove this restriction and implement assertion functions also in other ways if we find it more suitable?