Exemplo n.º 1
0
        public void Transformations_TransformationContext_ExecuteBefore1()
        {
            var dep = new TestDependency(true);

            ruleT1.Dependencies.Add(dep);

            var comp = context.CallTransformation(ruleT1, "a");

            Assert.IsTrue(dep.IsHandled);
        }
Exemplo n.º 2
0
        public void Transformations_TransformationContext_DelayedSinglePersistorT1_1()
        {
            bool persistorCalled = false;

            ruleT1.SetOutputDelayLevel(2);
            ruleT1.Call(otherT1, persistor: (s1, s2) =>
            {
                Assert.AreEqual(s1, s2);
                persistorCalled = true;
            });

            context.CallTransformation(ruleT1, "a");
            context.CallPendingDependencies();

            Assert.IsFalse(ruleT1.OutputCreated);
            Assert.IsFalse(persistorCalled);
            Assert.IsTrue(otherT1.OutputCreated);

            context.CreateDelayedOutputs();

            Assert.IsTrue(ruleT1.OutputCreated);
            Assert.IsTrue(persistorCalled);
            Assert.IsTrue(otherT1.OutputCreated);
        }