BooCompiler.Tests.PipelineTestCase.TestEventSequence C# (CSharp) Метод

TestEventSequence() приватный Метод

private TestEventSequence ( ) : void
Результат void
        public void TestEventSequence()
        {
            List calls = new List();
            _pipeline.Before += delegate { calls.Add("before"); };
            _pipeline.BeforeStep += delegate { calls.Add("before step"); };
            _pipeline.Add(new ActionStep(delegate { calls.Add("step"); }));
            _pipeline.AfterStep += delegate { calls.Add("after step"); };
            _pipeline.After += delegate { calls.Add("after"); };
            _pipeline.Run(new CompilerContext());
            Assert.AreEqual(
                new List(new string[] {"before", "before step", "step", "after step", "after"}),
                calls);
        }