Unit Testing
Old forum URL: forums.lhotka.net/forums/t/8229.aspx
jnthomas posted on Tuesday, December 29, 2009
Hello,
I've got a simple 3 layered architecture
UI - Silverlight
Business Layer - Client/Server CSLA
DataAccess Layer - Repository Pattern
Now I've done all my unit tests for my DataAccess Layer but when I try to do the same for my Business Layer I run into a little problem with the mocking.
What I would like to do is have my unit tests on the client side (in a Silverlight application) but still be able to mock all my calls to the DataAccess Layer. This would make my tests more complete as I would know if my objects failed their serializations (or other issues that might arise).
Is there a way to do this? If so could I have a quick example.
Thanks.RockfordLhotka replied on Tuesday, December 29, 2009
I discuss this in the
CSLA .NET for Silverlight video series, including code samples showing how to do a mock DAL that you can switch to through configuration.
jnthomas replied on Tuesday, December 29, 2009
Thanks Rocky. I'll go back to those videos.Copyright (c) Marimer LLC