Skip to main content
3 events
when toggle format what by license comment
Feb 4, 2013 at 20:25 comment added Songo @AdamKDean well you tell me :) How would you know if a user was added successfully? If you are adding him to a collection them maybe I'll call it AddUser_GivenNewUser_UserAddedToCollection that way I know my assert will check for the user in that collection and I have a way to start my test. If you are returning a boolean then I'll call it AddUser_GivenNewUser_ReturnsTrue. It all depends on how you want people to use your api.
Feb 4, 2013 at 19:32 comment added Adam K Dean This is a good way to name tests, but may I ask how you would name something that, for example, added a user but did not get a return? Lets say it adds the user, then checks the user has been added, would you call that AddUser_GivenNewUser_UserAdded?
Feb 4, 2013 at 16:29 history answered Songo CC BY-SA 3.0