I am wondering what is best in Test Driven Development / testing, using unit tests when it comes to increasing capabilities.
eg. I have a requirement that when a Class Foo
object receives a bar()
message, it should update this counter
field accordingly. I create a test case for this, which creates a Foo
object and then validates it.
Now what should I do if there is a new requirement, when Foo
receives the message bar()
another field, counter2
should be updated. Should I create a new test case for this that only checks the second requirement or am I just updating the first test case?
source share