Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    In addition to this, writing degenerate test cases can sometimes help, for example, write a test for what would happen if the user passes null to the add method. Commented Nov 1, 2016 at 18:43
  • Thank you for this great input! I understand the merits of the different ways to go about it now I think. I try to adhere to "one assert per test" though. Your post also made me think of different ways to tackle the Entity class and what would happen if I e.g. wrote a test for different methods first. Commented Nov 2, 2016 at 18:20