Are there any updates to this problem yet?
This is a critical deal-breaker for any applications that want to use Unity for Dependency Injection which is more and more commonplace.
Any applications that make service calls likely have local versions of the service classes that are used when running the application during development, and dependency injection is a really common pattern for solving this problem in a clean way.
Any comments on the plans for getting this working? Also if you could shed any light on the underlying issues it would be kindly appreciated. This so far prevents us from adopting TypeMock as a feasible mocking framework for our organization, which is sad because there are certainly a lot of upsides we were looking forward to.
Another variation that doesn't work:
ILoginService loginService = Isolate.Fake.Instance<ILoginService>();
Container.RegisterInstance( loginService );
Isolate.WhenCalled( () => loginService.Authenticate( validCredentials )).WillReturn( true );
after resolving the mocked instance the matchers that were set up do not match:
ILoginService loginService = Container.Resolve<ILoginService>()
bool thisShouldReturnTrueButReturnsFalse = loginService.Authenticate( validCredentials );