|
| ECO/TDD/Mocking |
 |
Thu, 13 Mar 2008 08:37:46 -000 |
I've put a TDD website on my blog. It uses Rhino Mocks, MS Web Extensions
(AKA MVC), and ECO.
It's only a very basic site, just lets you sign up for an account and sends
an email. I finally found an approach I am happy with, one that works and
doesn't require much work.
01: Using PersistenceMapperMemory allows me to mock a database. All the
features that I need such as AutoInc are there, and any objects I
"save"
only exist until I deactivate my EcoSpace so I don't need to worry about
cleaning down the DB of rows or having to mock the persistence.
02: Using EcoSpace.RegisterEcoService and EcoSpace.GetEcoService<> allows
me
to re-register services (such as IEmailSender) with mock objects during
testing. This uniformed access to services ensures that I always use the
mocked object no matter which project in my solution accesses it.
I thought I'd mention it in case anyone wanted to download it and take a
peek.
Pete
PS: It's a VS2008 project
|
| Post Reply
|
| Re: ECO/TDD/Mocking |
 |
Thu, 13 Mar 2008 08:38:20 -000 |
http://mrpmorris.blogspot.com :-)
|
| Post Reply
|
|
|
|
|
|
|
|
|
|