Hi Ronald,
You should not use the Swap.NextInstance feature, instead you can use the Isolate.Fake.NextInstance
to fake Service instace inside the ExampleClass constructor.
And for invoking private method you should use the isolator api Isolate.Invoke.Method,
for example:
[ExpectedException(typeof(WebException))]
[TestMethod]
public void TestMethod1()
{
Service faked = Isolate.Fake.NextInstance<Service>(Members.ReturnRecursiveFakes, ConstructorWillBe.Called);
ExampleClass Trx = new ExampleClass();
Isolate.WhenCalled(() => faked.SyncMethod(null)).IgnoreCall();
Isolate.Invoke.Method(Trx, "ExecuteProcess");
}
Tell me if it helps.
Daniel