예제 #1
0
        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);
        }
        public void InvokingAExistingServiceShouldReturnStatus()
        {
            var callInPreviousRun = new ServiceCall(new TestService(), type.GetMethod("Method"));

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

            var callStatus = serviceExecution.Invoking(new TestService(), type.GetMethod("Method"));

            Assert.That(executionHistory.ServiceCalls, Has.Count.EqualTo(1));
            Assert.That(callStatus, Is.Not.Null);
            Assert.That(callStatus.ReturnValue, Is.Not.Null);
        }