예제 #1
0
        public void NoExceptionCreatesSuccessResult()
        {
            Action action = () => { };

            var sut = new JourneyStep(action, "test");

            var result = sut.Execute();

            Assert.IsInstanceOf<SuccessResult>(result);
        }
예제 #2
0
        public void NotImplementedExceptionCreatesPendingResult()
        {
            Action action = () => { throw new NotImplementedException(); };

            var sut = new JourneyStep(action, "test");

            var result = sut.Execute();

            Assert.IsInstanceOf<PendingResult>(result);
        }
예제 #3
0
        public void ExceptionsCreateFailureResults()
        {
            Action action = () => { throw new ApplicationException(); };

            var sut = new JourneyStep(action, "test");

            var result = sut.Execute();

            Assert.IsInstanceOf<FailureResult>(result);
        }