public void IsLoginOK_WhenCalled_WritesToLog()
        {
            var fakeLogger = Isolate.Fake.Instance<RealLogger>();
            Isolate.Swap.AllInstances<RealLogger>().With(fakeLogger);

            var lm = new LoginManagerWithFutureObject();
            lm.IsLoginOK("a", "b");

            Isolate.Verify.WasCalledWithAnyArguments(() =>
                fakeLogger.Write(""));
        }
        public void IsLoginOK_StaticLoggerThrowsException_CallsStaticWebService()
        {
            var fakeLogger = Isolate.Fake.Instance<RealLogger>();
            Isolate
                .WhenCalled(() => fakeLogger.Write(""))
                .WillThrow(new LoggerException("fake exception"));
            Isolate.Swap.NextInstance<RealLogger>().With(fakeLogger);

            var fakeWebService = Isolate.Fake.Instance<WebService>();
            Isolate.Swap.AllInstances<WebService>().With(fakeWebService);

            var lm = new LoginManagerWithFutureObject();
            lm.IsLoginOK("a", "b");

            Isolate.Verify.WasCalledWithAnyArguments(() =>
                fakeWebService.Write(""));
        }