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

when the following code gets executed
Isolate.Fake.Instance<AddRuntimeFieldsFromModelToXPDictionary>(Members.CallOriginal)


it throws the following exception
------ Test started: Assembly: WM.eXpressApp.Module.Win.dll ------

Gallio TestDriven.Net Runner - Version 3.0.4 build 485

Test Assemblies:
   E:NET SolutionsCsharpWMSpiliotopoulosTheProjectWM.FrameWorkeXpressAppeXpressApp.Module.WineXpressApp.Module.WininDebugWM.eXpressApp.Module.Win.DLL

Start time: 4:25 μμ
Verifying assembly names.
Initializing the test runner.
Loading the test package.
Exploring the tests.
Running the tests.
TestCase 'MbUnit v3.0.4.485/WM.eXpressApp.Module.Win/AddRuntimeFieldsFromModelToXPDictionaryTestFixture/Test_That_Fields_Added_At_Model_Editor_Saving_Event'
failed: 
   TypeMock.TypeMockException: 
   *** No method with name OnActivated>b__0 in type eXpressApp.Module.Win.Controllers.AddRuntimeFieldsFromModelToXPDictionary exists.
   at bs.b(Type A_0, String A_1)
   at bs.c(Type A_0, String A_1)
   at TypeMock.Mock.a(String A_0, Object A_1, Boolean A_2, Boolean A_3, Int32 A_4, Type[] A_5)
   at TypeMock.Mock.a(String A_0, Object A_1, Boolean A_2, Boolean A_3, Type[] A_4)
   at TypeMock.Mock.AlwaysCallOriginal(String method, Type[] genericTypes)
   at TypeMock.MockManager.a(Mock A_0, BindingFlags A_1)
   at cc.ExpectOriginalValues[T](BindingFlags flags)
   at cc.Instance[T](Members behavior)
   E:NET SolutionsCsharpWMSpiliotopoulosTheProjectWM.FrameWorkeXpressAppeXpressApp.Module.WineXpressApp.Module.WinControllersFixturesAddRuntimeFieldsFromModelToXPDictionaryTestFixture.cs(32,0): at eXpressApp.Module.Win.Controllers.Fixtures.AddRuntimeFieldsFromModelToXPDictionaryTestFixture.Test_That_Fields_Added_At_Model_Editor_Saving_Event()
   at TypeMock.VerifyMocksAttribute.Execute()
   at TypeMock.MethodDecorator.e()
   at TypeMock.MockManager.a(String A_0, String A_1, Object A_2, Object A_3, Boolean A_4, Object[] A_5)
   at TypeMock.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected)
   E:NET SolutionsCsharpWMSpiliotopoulosTheProjectWM.FrameWorkeXpressAppeXpressApp.Module.WineXpressApp.Module.WinControllersFixturesAddRuntimeFieldsFromModelToXPDictionaryTestFixture.cs(31,0): at eXpressApp.Module.Win.Controllers.Fixtures.AddRuntimeFieldsFromModelToXPDictionaryTestFixture.Test_That_Fields_Added_At_Model_Editor_Saving_Event()

Unloading the test package.
Disposing the test runner.
Stop time: 4:25 μμ (Total execution time: 5,439 seconds)

Test Report: file:///C:/Documents%20and%20Settings/abekiaris/Local%20Settings/Temp/Gallio.TDNetRunner/WM.eXpressApp.Module.Win.DLL.html

0 passed, 1 failed, 0 skipped, took 14,66 seconds.




why is that ? since Members.CallOriginal i would expect that line to pass
asked by tolisss (28.8k points)

1 Answer

0 votes
Hi Tolisss,

This is of course not the expected behavior. The problem is probably specific to the class you are trying to fake - can you post its code here or send it to our support mailbox?

Thanks,
Doron,
Typemock Support
answered by doron (17.2k points)
...