CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Csla, Unit testing and mocking

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 1 Reply | 0 Followers

Top 10 Contributor
3,922 Posts
Andy posted on Wed, Jun 30 2010 8:23 PM

Hi,

I'm looking for some direction on how best to mock csla objects, especially between a root and its children.  I'm under the impression that to effectively do this kind of testing, one really needs to take advantage of the ObjectFactory way of doing things. 

Can someone that's been through this give some advice on how to proceed?  I have an existing Csla project where I'd like to more seperate the unit tests (currently the tests are more like integration tests, because the db is required and a test is really checking a root and it's children at the same time).

Thanks

Andy

All Replies

Top 50 Contributor
184 Posts

 

Hello,

We have some generated C# NUnit test templates that were contributed that could be used as a reference. They need some work... but they are a starting point for anyone looking for unit testing. You can download them here. I'm currently investigating this user submitted sample that uses mocking.

Hope this helps!

Thanks

-Blake Niemyjski

 

Thanks

-Blake Niemyjski (Author of the CodeSmith CSLA templates and CSLA Core team member).

 

Page 1 of 1 (2 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems