Hello Lior,
thanks for immediate response.
What you mentioned that I already done, there are no any compilation error.but when I run the NUnit GUI, it shows all the test cases included in this example project are failing. I am getting error:
Examples.Tests.NaturalMocks.Test1_Basic.MockTheFactoryAlways : TypeMock.TypeMockException :
*** TypeMock.NET is not enabled, to enable do one of the following:
1. run 'mocking_on.bat' before running the tests
2. run tests via TMockRunner.exe
3. use TypeMockStart tasks for MSBuild or NAnt
4. set Tools->Enable TypeMock.NET from within Visual Studio
For more information consult the documentation (see Running topic)
I tried to follow the steps mentioned above, i run the bat file, but i am not able to run TMockRunner.exe. I am not understanding the step 2 and 3.
I tried to add the code mentioned in help files, to the MSBuild file of project, but its not working. I have tried to add following snippets:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TypeMockLocation>C:Program FilesTypeMockTypemock Isolator</TypeMockLocation> <NUnit>"C:Program FilesNUnitin
unit-console.exe"</NUnit> </PropertyGroup> <Import Project ="$(TypeMockLocation)TypeMock.MSBuild.Tasks"/>
<Target Name="TestWithTypeMock">
<TypeMockStart/> <Exec ContinueOnError="true" Command="$(NUnit) Test.dll"/> <TypeMockStop/> </Target></Project>
In visual studio, its already showing typemock enabled.