I don't like those type of tests, since the one you are talking about is tied to the implementation.
As you say that's good to put clear contracts between classes, but I don't see the purpose of that even when I think having clear interfaces is important.
Instead I prefer to test how each function answers with different parameters and edge cases.
Thanks for sharing and making me think about testing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't like those type of tests, since the one you are talking about is tied to the implementation.
As you say that's good to put clear contracts between classes, but I don't see the purpose of that even when I think having clear interfaces is important.
Instead I prefer to test how each function answers with different parameters and edge cases.
Thanks for sharing and making me think about testing.