← Back to Upcase

Should you test Null Objects?

Usually when extracting Null Objects they turn out to be very basic objects with methods that return a single value, is it worth testing these separately, or is it enough to just test the object that you extracted it from still behaves the same way?

If your existing tests cover the behaviour, I would leave the extracted class as an implementation detail with no direct tests.