lucaminudel/TDDwithMockObjectsAndDesignPrinciples — pull request #30 by wubin28 (2014-06-11 16:05:44+00:00)
Title: Used "Subclass and set superclass' field" to verify the next turn number should be increased by 1

The method TurnNumberSequence.getNextTurnNumber() will be called if I inject the instance of the subclass of TurnNumberSequence into TicketDispenser. I think this test could truly verify that after the ticket 10 really come ticket 11. I read your mock version for this test and it only verified that the method getNextTurnNumber() in the interface is called once. If I change the production code in the method TurnNumberSequence.getNextTurnNumber() to be "return turnNumber + 2;", the mock version of the test code cannot catch it.