public virtual void Invoked(object returnValue) { currentServiceCall.ReturnValue = returnValue; executionHistory.Add(currentServiceCall); currentServiceCalls.Add(currentServiceCall); executionHistory.Save(); }
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); }