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
0 votes
Hi,
I just installed the complete evaluation. Trying to run the below unit test on VS 2012 ultimate.. it is throwing the below exception. Please help me to proceed.
--> I am not seeing Bug shield icon in the editor.
If I run the below test, it is throwing the below exception. Any clues?
Test Method.
[TestMethod, Isolated]
public void SomeTestMethod2()
{

var dateTime = Isolate.Fake.AllInstances<DateTime>();

}

Exception Details:
System.TypeInitializationException occurred
HResult=-2146233036
Message=The type initializer for 'TypeMock.InterceptorsWrapper' threw an exception.
Source=TypeMock
TypeName=TypeMock.InterceptorsWrapper
StackTrace:
at TypeMock.InterceptorsWrapper.VerifyInterceptorsIsLoaded()
at gt.e()
at TypeMock.MockManager.Init(Boolean collectAllCalls)
at TypeMock.MockManager.Init()
at g3.CreateFakeInstance[T](Members behavior, Constructor constructorFlag, Constructor baseConstructorFlag, Type baseType, Object[] ctorArgs)
at g3.Instance[T](Members behavior, ConstructorWillBe constructorBehavior)
at g3.AllInstances[T](Members behavior, ConstructorWillBe constructorBehavior)
at g3.AllInstances[T](Members behavior)
at g3.AllInstances[T]()
at Deloitte.DA.EMS.Client.Business.CoreAudit.Tests.EngagementRiskServiceProviderTest.SomeTestMethod2() in c:DADA4.0SourceTestsDeloitte.DA.EMS.Client.Business.CoreAudit.TestsEngagementRiskServiceProviderTest.cs:line 33
InnerException: System.FormatException
HResult=-2146233033
Message=Additional non-parsable characters are at the end of the string.
Source=mscorlib
StackTrace:
at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
at System.Convert.ToInt32(String value, Int32 fromBase)
at gt.b()
at gt.e()
at TypeMock.InterceptorsWrapper.GetInterceptorsAssembly()
at TypeMock.InterceptorsWrapper..cctor()
InnerException:


Thanks in advance.
asked by krishnav (600 points)

1 Answer

0 votes
Hi,

There seems to be 2 issues:

1) If you don't see any shields in VS please run the following line in CMD:
"C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDEdevenv.exe /setup"

2) System.TypeInitializationException issue:
-Did you upgrade Typemock's version or was it the first installation on your machine?
- make sure that there is only one version of Typemock.Interceptors in your GAC and that it's version corresponds the version of Isolator installed.

Let me know if it helps.
answered by alex (17k points)
...