|
From: <OR...@th...> - 2003-06-02 12:57:40
|
the Assertion class has relatively few Assert methods, so another thing that is great to do is to create a subclass of Assertion that you can put your custom assert methods into. right now within the CC.NET project, for example, there is a CustomAssertion class that has methods like AssertNotEquals, AssertFalse, AssertContains, etc. cheers, o. --- R. Owen Rogers ThoughtWorks Ltd Peek House 20, Eastcheap London EC3M 1EB tel: +44 (0) 207 090 7400 mobile: +44 (0) 787 673 8898 |---------+-----------------------------------------> | | Jeremy Stell-Smith | | | <ste...@ya...> | | | Sent by: | | | nmo...@li...| | | ceforge.net | | | | | | | | | 06/01/2003 04:28 PM | |---------+-----------------------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | | To: nmock <nmo...@li...> | | cc: | | Subject: Re: [Nmock-general] mocking members from base interfaces | >------------------------------------------------------------------------------------------------------------------------------| Thanks, Joe, I'll try this out Yeah, I do this all the time. I was complaining to Two about how there's no default TestCase that already extends Assertion as there is in JUnit, and he pointed out there's another pattern which is nice to use sometimes. Which is the testcase extends the class under test. So I'm happy extending assertion when possible. Another idea that I'd be interested in hearing about someone actually using is putting your test methods in your production class. More and more I question making everything separate. Plus it seems the simplest thing that could possibly work. That said I'm not doing it - yet. I think I still like to have classes that are very small and elegant, test code would obfuscate them a little (of course we could always hide it in a test region :) hehe) Jeremy --- Joe Walnes <jo...@tr...> wrote: > Thanks Jeremy - I'll look into this. > > I noticed that your testcase extends Assertion - I > presume this is so > it's easier to use use AssertBlah methods. Is this a > pattern you use > frequently? Does anyone else do this? > > -joe __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Nmock-general mailing list Nmo...@li... https://lists.sourceforge.net/lists/listinfo/nmock-general |