Ejemplo n.º 1
0
        public void Should_Throw_Exception_If_Non_Success_ExitCode_And_Throw_Error_True()
        {
            var executeResponse = new ExecuteResponse
            {
                ExitCode = 999,
                Output   = "This will be exception message"
            };
            var callbackExitCode = 0;

            Assert.Throws <Exception>(() =>
            {
                processor.Process(executeResponse, exitCode =>
                {
                    callbackExitCode = exitCode;
                    return(false);
                }, true, null, null);
            }, executeResponse.Output);
            Assert.AreEqual(executeResponse.ExitCode, callbackExitCode);
        }
Ejemplo n.º 2
0
 public void Should_Return_False_If_Response_Is_Null_As_Cancelled()
 {
     Assert.IsFalse(processor.Process(null, null, true, null, successCallback));
     Assert.IsFalse(successCallbackCalled);
 }