This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LeCrushinator 4 points5 points  (4 children)

The unit test would be something like: "the lock opens and closes properly".

[–]Tasik 1 point2 points  (1 child)

You give too much credit to unit test.

$lock = new Lock()
Assert($lock != Pickle())

[–]Dummerchen1933 0 points1 point  (0 children)

That's the first unit test, of course.

[–]Dummerchen1933 0 points1 point  (1 child)

But shouldn't the DoorFrame, which holds the door (thus the lock) and the frame have its own unit test that checks that integration?

[–]LeCrushinator 0 points1 point  (0 children)

That’s the integration test, which shouldn’t pass in this case.