(no title)
mariodiana | 1 year ago
If we want to know the Door object's state, that's another set of messages.
If the door is open and locked, we don't know what's supposed to happen until we reference the business rules, which is what a lot of people on here are alluding to. Maybe we have a deadbolt, but maybe it's fine to assume that the user is going to unlock the door if necessary before closing it, and that the closed door is now in an unlocked state until the "lock" message is sent.
However this is implemented, our tests will only be on the Door object's interface, and we'll be testing the business rules.
No comments yet.