chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
almost all the tests fail in the sample project, I have turned TypeMock on in visual studio and also tried the batch file what am I missing?
asked by jwaldner (1.3k points)

12 Answers

0 votes
You are probably missing an Enterprise License.
The test are examples that show all aspects of TypeMock.NET including the Professional and Enterprise Features.

It is best to run the tests one by one, Understand what they are doing and look at the remarks.

Of course I might be mistaken. What test fails? What is the failure.
answered by scott (32k points)
0 votes
I am indeed using the demo software but all the tests fail but the objectstate tests. that does not seem right.

The tools menu shows enabled, the project compiles but the tests fail.
answered by jwaldner (1.3k points)
0 votes
Ok, what is the failing message
answered by scott (32k points)
0 votes
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)
answered by jwaldner (1.3k points)
0 votes
As the error suggest, TypeMock is not turned on.
If you are running through visual studio do the following:
1. Make sure that the Tools->Disable TypeMock is showing (Disable mean that it can be disabled and is now enabled - we really should change that).
2. If you are running TestDriven, stop the Rocket in the Notification Area.
3. Rerun tests
answered by scott (32k points)
0 votes
it does show up on the tools menu and the option to disable is there. Just for kicks I also put it on my labtop with the same result....I also have the demo liceince from the email entered in with the same result.
answered by jwaldner (1.3k points)
0 votes
Please tell me:
1. TypeMock Version
2. Visual Studio Version
3. Test Framework
4. Please write exactly how you are running the tests?
5. Other Add-ins.
answered by scott (32k points)
0 votes
1. TypeMock Version 3.5.1.0
2. Visual Studio Version 2005 standard edition
3. Test Framework 2.2.7
4. Please write exactly how you are running the tests?
am using the nunit gui

5. Other Add-ins. no other add ins

??? If I don't use the demo liceince does the one mock restriction apply?
answered by jwaldner (1.3k points)
0 votes
If you are using the NUnit GUI, You must enable TypeMock First.
You can do this by creating a shortcut to:
[TypeMock-Install Directory]TMockRunner.exe [NUnit-Dir]in unit-gui.exe <path to dll>

NOTE: The visual studio plugin will work only for executables run from within the studio. So if you change the debug application of the test dll to run nunit-gui, you don't have to run it through TMockRunner.

To answer the other question, if you don't use the demo there is no limit on the amount of types mocked.
answered by scott (32k points)
0 votes
What can't I do with the free download? all those command line parameters are very difficult to get right in windows you guys should have at least an an app that asks for the two paths with a windows interface and runs the code in the exe...
answered by jwaldner (1.3k points)
...