Hi There,
Apologise in advance if this has been answered elsewhere, but I have not been able to find any answers on the forums.
I have a method that I am trying to test and in the method it calls a static method on a static class.
Isolate.Fake.StaticConstructor(typeof(Resolver));
Isolate.Fake.StaticMethods(typeof(Resolver),Members.CallOriginal);
Isolate.WhenCalled(() => Resolver.Resolve<IRepository<WebSite>>()).WillReturn(fakeRepository);
But what I am seeing happen is that the original Static class and methods are still being called and I am receiving a NullReference exception.
I would have thought that I would need to swap the instance out with a fake instance, but not being able to create fakes of static types, I am unsure how to proceed.
Any help would be greatly appreciated.
Jarrod[/code]