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 ?