Sorry, long variable names have their place as long as they’re telling you something meaningful, and when unit testing, ensuring methods are called with the values you expect is important. It helps you ensure what you’re delivering is sound AS you code it, and it helps future developers know if they’ve messed something up when making changes or refactoring.

There are frequently cases where if you don’t call a particular method you may still return the same result. So a test that is looking purely at the result may miss something critical. E.g. someone accidently commented out the code that sends that email, or added a conditional that means that an event never gets created, having subtle side effects that you and your code reviewers don’t notice.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store