From: Tim M. <tim...@po...> - 2003-07-01 23:35:52
|
Just as small comment, I would say the unit tests for dynamock haven't been through the ringer with different people so they probably need a bit of refactoring (not that this is an excuse). That said - what Chris is trying to do shouldn't be too hard if he paired with either nat or myself (you are trying to do this without a knowledge spread which is understandably difficult especially as dynamock was written in essentially two intense days by only two people). I will say we made some quite radical changes during the two days, and a bit afterwards and the tests weren't too hard to modify. So Yes - remembering how the old mocks work is crucial to reading the tests - we probably should back port the old mocks to the new format (but no-one has the time). I will restate that at the time, initially we didn't do mock style tests for dynamock and they really stalled our development (I distinctly remember this). You will also probably need MockMaker if you are playing around with the interfaces so you can easily regenerate the old mocks (doing it by hand is very time consuming). Functional testing is not really the answer (definitely its not a replacement for unit tests, i see too many people write fucntional tests, or very high level unit tests and then they feel they have the justification to hack for several hours getting their "test first test" to run. Its bad news!). There is a simple functional test for dynamock, its in the examples package, called SimpleServletTest - it was used as our way of expressing features we wanted to work, we then dropped down to unit test to get those features to work. It does have the downside that its servlet based, but it was the quickest example I could think of to show nat all of the types of interactions we had to deal with (and it drove the matchAndReturn syntax). Tim > -----Original Message----- > From: moc...@li... > [mailto:moc...@li...]On Behalf Of > Steve Freeman > Sent: 01 July 2003 23:58 > To: moc...@li... > Subject: Re: [MO-java-dev] DynaMock proxy toString issue > > > chris cottee wrote: > > I think there need to be some functional tests for Mock as well as the > > mocked unit tests. Functional tests > > are (in this case) better at expressing the intent of the code since > > they are effectively examples of usage. > > Agreed. We've talked about writing some fit tests that would apply to > both the java and C# versions. > > I'm beginning to find the current unit tests problematic too. I've been > trying to add Chris's idea of just adding some default matches for > methods like toString() and it's a right pain (and shouldn't necessarily > be visible in the tests). > > Chris are you implementing all this in 0.09. If so, I'll stop. Also, I > suggest you break up your proposed additional unit tests into 4 specific > tests, rather than one big one. > > Steve > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > Mockobjects-java-dev mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.490 / Virus Database: 289 - Release Date: 16/06/2003 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.490 / Virus Database: 289 - Release Date: 16/06/2003 |