We are looking at Mock object frameworks for our net developement. TypeMock looks interesting on paper but I am having a lot of trouble evaluating its utility.
We use nant to do our builds (and the unit2 task to run our tests). In addition, we are using Clover.Net to process coverage. First, it seems that adding TypeMock would break all our Nant build scripts as we would have to process nunit and clover using a different stategy :cry: . Do you have any plans for a better solution to these problems.
I have downloaded TypeMock marked as 18.104.22.168. and I am using the .NET framework 1.1. We are using nant-0.85-rc2. I have installed the standard DEMO license to enable the use of nant tests.
I am using a simple project to evaluate TypeMock so currently I have a single class being tested with two tests. I am more or less following the documentation. I initialize the MockManager as the first thing in my test and Verify as the last.
Everytime I run my tests the TypeMockStop task throws... I doubt that this is what is suppose to happen:
System.IO.FileNotFoundException: File or assembly name Configuration, or one of its dependencies, was not found.
Nom du fichier : "Configuration"
at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
In my tests, I create a single MockObject in each test, but I still get a message that my license only allows me to create a single mock... is this the intended behavior (i.e. 1 mock object created per nunit run). If so, I would say that there is little chance that I will be able to effectively evaluate this product.
Finally as I am writing my tests before my implementation the method on my mock that I expect to be called (ExpectCall()) is never called. I would expect this to be verified when I call the Verify method - but it does not seem to be. If I call GetCallCount() on the target method I can see that it is never called however.
Do you have any comments on these problems?