Exemplo n.º 1
0
        public void ShouldBeConvertedToCycleWithOriginationAndTermination()
        {
            var cycle = execution.Between(origination, termination);

            cycle.Span.Origination.Originate();

            Assert.IsTrue(origination.Originated);

            cycle.Execution.Execute();

            Assert.IsTrue(execution.Executed);

            cycle.Span.Termination.Terminate();

            Assert.IsTrue(termination.Terminated);
        }
        public void ShouldBeConvertedToCycleWithActions()
        {
            var originated = false;
            var terminated = false;
            var cycle      = execution.Between(() =>
            {
                originated = true;
            }, () =>
            {
                terminated = true;
            });

            cycle.Span.Origination.Originate();

            Assert.IsTrue(originated);

            cycle.Execution.Execute();

            Assert.IsTrue(execution.Executed);

            cycle.Span.Termination.Terminate();

            Assert.IsTrue(terminated);
        }