Hallo,
we have upgraded to Typemock 7.4.0.0 after doing this some of our tests crashed. Most of them are related to remove the "LoadView"-methods. (WPF)
We get the following error (german):
System.Reflection.TargetInvocationException : Ein Aufrufziel hat einen Ausnahmefehler verursacht.
----> System.TypeInitializationException : Der Typeninitialisierer für "<Module>" hat eine Ausnahme verursacht.
----> <CrtImplementationDetails>.ModuleLoadException : The C++ module failed to load during appdomain initialization.
----> System.NullReferenceException : Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Exception has been thrown by the target of an invocation.
Its easy to reproduce:
Class1 (access the view)
public class Class1
{
private MainWindow window;
public void LoadView()
{
window = new MainWindow();
}
public void BlaBla()
{
LoadView();
}
}
TestClass:
[TestFixture]
public class TestClass
{
[Test]
public void XX()
{
var q = new WpfApplication3.Class1();
Isolate.WhenCalled(() => q.LoadView()).IgnoreCall(); //crash!
q.BlaBla();
}
}
Hope somebody can help me. Thank you!