public virtual void Intercept(IInvocation invocation)
        {
            Method method          = new Method(invocation.Method);
            bool   snapShotEnabled = method.HasAttribute(typeof(WorkSnapshotAttribute));

            LastServiceCallStatus lastServiceCallStatus = serviceExecution.Invoking(service, invocation.Method);

            if (lastServiceCallStatus.WasExecuted)
            {
                invocation.ReturnValue = lastServiceCallStatus.ReturnValue;
            }
            else
            {
                if (snapShotEnabled)
                {
                    serviceExecution.TakeSnapshot();
                }
                ReflectedObject reflectedServiceObject = new ReflectedObject(service);
                sessionReport.Begin(invocation.Method.Name);
                try
                {
                    invocation.ReturnValue = reflectedServiceObject.Invoke(invocation.Method, invocation.Arguments);
                    serviceExecution.Invoked(invocation.ReturnValue);
                }
                catch (Exception e)
                {
                    sessionReport.Act();
                    serviceExecution.Error();
                    throw new WhiteException(string.Format("Error Invoking {0}.{1}", reflectedServiceObject.Class.Name, invocation.Method.Name), e.InnerException);
                }
            }
        }
        public void InvokingANewServiceShouldAddItToEventHistory()
        {
            LastServiceCallStatus callStatus = serviceExecution.Invoking(new TestService(), @class.GetMethod("Method").MethodInfo);

            serviceExecution.Invoked(null);
            Assert.AreEqual(1, executionHistory.ServiceCalls.Count);
            Assert.AreEqual(false, callStatus.WasExecuted);
        }
        public void InvokingAExistingServiceShouldReturnStatus()
        {
            var callInPreviousRun = new ServiceCall(new TestService(), @class.GetMethod("Method").MethodInfo);

            executionHistory.Add(callInPreviousRun);
            callInPreviousRun.ReturnValue = string.Empty;

            LastServiceCallStatus callStatus = serviceExecution.Invoking(new TestService(), @class.GetMethod("Method").MethodInfo);

            Assert.AreEqual(1, executionHistory.ServiceCalls.Count);
            Assert.AreNotEqual(null, callStatus);
            Assert.AreNotEqual(null, callStatus.ReturnValue);
        }