samedi 19 mai 2018

How to use TDD for methods which are expected to do nothing for certain inputs?

I am sure this is a silly question but I simply do not know - suppose I have a method that is expected to do nothing for certain inputs. Like, value < 10, print chars, otherwise do nothing. Basically, the unit test would pass for the actual method or for one with just an empty body. How do I write a failing test for such an instance?

Aucun commentaire:

Enregistrer un commentaire