No BO Interfaces - how to create Mock Objects with NUnit testing?

No BO Interfaces - how to create Mock Objects with NUnit testing?

Old forum URL: forums.lhotka.net/forums/t/526.aspx


brettswift posted on Sunday, July 02, 2006

I'm new to Test Driven development.  Trying to learn this independantly (at the same time as CSLA) and I'm becoming comfortable with CSLA - now trying to figure out how to use test driven development with it.

Seeing as CSLA doesn't use Interfaces in its BO design, how can we accomplish this?  A common design would be:

IEmployee    --> Employee
                   --> EmployeeMockObject
                   -->EmployeeInfoGUI   (or something like that).

Is there a way that we could implement Interface design into the CSLA BO's ?    In the case of my Task class, maybe it could look something like this :

   public class Task : BusinessBase<Task>, ITask
 
Any Test Driven developers out there that have had success with this ?



Copyright (c) Marimer LLC