On Fri, 4 Jan 2008 16:17:20 +0000, Paul Cowan <[EMAIL PROTECTED]> wrote:
>I have to create the plan each time. >I have to assign contacts to the plan. >They have to request sign off in order to be able to sign it off.I raise exceptions if any of the above is not the case if a sign off is requested and all is not good. > Are/do you also want to test the creation of a plan, assignment of contacs to a plan? If you just want to test sign-off then you'll likely want to mock that. >I also want to create and delete the plan from the database on each unit test. > Most TDD purists will tell you that you should always mock the database; there's no real need to test that. >Emails get sent out etc. which I am able to mock. I didn't quite get that, you're mocking sending of the email? What's the point of that? Will the outcome of your test be the same without the call to _mockEmailSender.Send()? I.e. are there any side-effects to that call? If not, you're only testing the mock... =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com