That makes total sense. I now see how I can do this in isolation. Mocking is the answer. Thanks for that. I was in a very dark land for a while. [EMAIL PROTECTED]
> Date: Fri, 4 Jan 2008 12:02:59 -0500> From: [EMAIL PROTECTED]> Subject: Re: > [ADVANCED-DOTNET] Unwiedly unit test> To: > ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> > On Fri, 4 Jan 2008 16:35:28 +0000, > Paul Cowan <[EMAIL PROTECTED]> wrote:> >It means I do not have to rely on > SMTP being installed and configured on> the machine running the tests.> > > Okay, but then what does "Send" do? It's not testing sending of mail. If> > it's just there because that's part of the process, then it's not testing> > anything.> > >> >> Most TDD purists will tell you that you should always mock > the> database;> there's no real need to test that.> >> >Then how do you test > the database schema?I am using NHibernate to> generate the db but after > version 1 it will be all manual changes.Surely> the schema needs tested as > well.> > If you want, unit test the database separately. When you know you > can> create/read/update/delete all the objects you need to to the database > then> you know the database is good. You're then free to unit test > everything> else mocking the database.> > If you want to do integration > testing (testing an entire scenario/use-case> without mocks or fakes) you can > still do that. It's best to separate unit> testing from integration testing. > What you've detailed looks like a mix> of integration testing and unit > testing.> > There may well be failures in integration testing that weren't > found in> unit testing, that's expected.> > > ===================================> This list is hosted by DevelopMentorĀ® > http://www.develop.com> > View archives and manage your subscription(s) at > http://discuss.develop.com _________________________________________________________________ Get Hotmail on your mobile, text MSN to 63463! http://mobile.uk.msn.com/pc/mail.aspx =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com