Пример #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);
        }