Ejemplo n.º 1
0
        public void TransitionContext_AbortTransition_TransitionIsAbortedAndHasErrors()
        {
            // Arrange
            Switcher switcher = new Switcher
            {
                Type = OnOffWorkflow.TYPE
            };
            var context = new TransitionContext(switcher);
            var reason  = "Some good reason in order to abort the transiton";

            // Act
            context.AbortTransition(reason);

            // Assert
            Assert.IsNotNull(context);
            Assert.IsTrue(context.TransitionAborted);
            Assert.IsFalse(context.HasVariables);
            Assert.IsTrue(context.HasErrors);
        }