This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am currently using LightSpeed 4. I have decided to evaluate it, together with implementing my controllers as subclasses of LightSpeedControllerBase My controller looks as follows:
In this context, I am wanting to test the List() method. The test criterion is easy, I need to test whether the Find My test code (using NUnit) currently looks as follows (although have attempted any combinations of things, all with no success):
The test gets an exception on the first line of the List() method. The message is:
Help on this will be greatly appreciated as my decision whether to continue using LightSpeed depends on this quite a lot. Thanks Ozzy |
|
|
You are going to have trouble performing an isolated test because you are leaning on LightSpeedControllerBase If you want to seperate this out there are a couple of approaches, however based on how you are currently using the UnitOfWork (you are using the IUnitOfWork methods rather than the LINQ IQueryables) you would probably want to look at shifting away from the LightSpeedControllerBase
|
|
|
Also if you end up going down the IUnitOfWork path, you can look at using our TestUnitOfWork which has been provided for this type of situation. More details are in the documentation here: http://www.mindscapehq.com/documentation/lightspeed/Testing-and-Debugging/Unit-Testing
|
|