From: Steve F. <st...@m3...> - 2002-06-07 01:51:28
|
You can overspecify, as well as underspecify, unit tests. We tried defaulting to 'hard' verification but found that it just got in the way, especially with mock objects that have multiple expectations that are used in different situations. We also found that specifying 'expect nothing' explicitly makes the tests more self explanatory. S. ----- Original Message ----- From: "Stephen Peterson" <csp...@ya...> To: <moc...@li...> Sent: Tuesday, June 04, 2002 2:46 PM Subject: [Mockobjects-java-users] the setExpectNothing method > Hi, > > I was looking over the setExpectNothing() method on classes like > ExpetationValue. > > How come this method isn't called as part of the > ExpectationValue constructor? > > Doing so would make tests fail when calls are made that are not > covered in the test. Wouldn't this be a good thing, since it > would force the tester to write more complete tests? > > Please share your insights with me. > > thanks > > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Mockobjects-java-users mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-users > |