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
When I want to return a XmlDocumnet with WiilReturn
I'll get a exception:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MethodAccessException: System.Xml.XmlNode..ctor().


My Code likes this:

BetsyWebserviceInterface fake = Isolate.Fake.Instance<BetsyWebserviceInterface>();

antwoord = new XmlDocument();
antwoord.LoadXml("<Polis><Polisnummer>12</Polisnummer></Polis>");            

Isolate.Swap.NextInstance<BetsyWebserviceInterface>().With(fake);
Isolate.WhenCalled(() => fake.GetTabel("T5339", "08")).WillReturn(antwoord);


How can I return a XmlDocument ?
asked by Sjef (600 points)

1 Answer

0 votes
Hi Sjef,

This should indeed be supported. We will look at it and get back to you soon.

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