Beispiel #1
0
        public void InitTestContext()
        {
            ruleT1 = new TestRuleT1();
            ruleT2 = new TestRuleT2();
            ruleTN = new TestRuleTN();

            baseT1 = new BaseTestRuleT1();
            baseT2 = new BaseTestRuleT2();
            baseTN = new BaseTestRuleTN();

            otherRuleT1 = new OtherRuleT1();
            otherRuleT2 = new OtherRuleT2();
            otherRuleTN = new OtherRuleTN();

            transformation = new MockTransformation(
                ruleT1, ruleT2, ruleTN,
                baseT1, baseT2, baseTN,
                otherRuleT1, otherRuleT2, otherRuleTN);
            transformation.Initialize();

            context = new MockContext(transformation);

            c_a   = context.Computations.Add(ruleT1, "a");
            c_ab  = context.Computations.Add(ruleT2, "a", "b");
            c_abc = context.Computations.Add(ruleTN, new object[] { "a", "b", "c" });

            c_other1 = context.Computations.Add(otherRuleT1, new Dummy());
            c_other2 = context.Computations.Add(otherRuleT2, new Dummy(), new Dummy());
            c_otherN = context.Computations.Add(otherRuleTN, new object[] { new Dummy(), new Dummy(), new Dummy() });
        }
Beispiel #2
0
        public void InitTestContext()
        {
            ruleT1 = new TestRuleT1();
            ruleT2 = new TestRuleT2();
            ruleTN = new TestRuleTN();

            ruleDependent  = new OtherRuleT1();
            transformation = new MockTransformation(ruleT1, ruleT2, ruleTN, ruleDependent);
            transformation.Initialize();
            context = CreateContext(transformation);
            trace   = context.Trace;

            c_a   = context.CallTransformation(ruleT1, new object[] { "a" });
            c_b   = context.CallTransformation(ruleT1, new object[] { "b" });
            c_ab  = context.CallTransformation(ruleT2, new object[] { "a", "b" });
            c_bc  = context.CallTransformation(ruleT2, new object[] { "b", "c" });
            c_abc = context.CallTransformation(ruleTN, new object[] { "a", "b", "c" });
            c_bcd = context.CallTransformation(ruleTN, new object[] { "b", "c", "d" });

            c_a.InitializeOutput("b");
            c_b.InitializeOutput(null);
            c_ab.InitializeOutput("c");
            c_bc.InitializeOutput(null);
            c_abc.InitializeOutput("d");
            c_bcd.InitializeOutput(null);
        }
Beispiel #3
0
        public void InitTestContext()
        {
            ruleT1 = new TestRuleT1();
            ruleT2 = new TestRuleT2();
            ruleTN = new TestRuleTN();

            ruleDependent = new OtherRuleT1();
            transformation = new MockTransformation(ruleT1, ruleT2, ruleTN, ruleDependent);
            transformation.Initialize();
            context = CreateContext(transformation);
            trace = context.Trace;

            c_a = context.CallTransformation(ruleT1, new object[] { "a" });
            c_b = context.CallTransformation(ruleT1, new object[] { "b" });
            c_ab = context.CallTransformation(ruleT2, new object[] { "a", "b" });
            c_bc = context.CallTransformation(ruleT2, new object[] { "b", "c" });
            c_abc = context.CallTransformation(ruleTN, new object[] { "a", "b", "c" });
            c_bcd = context.CallTransformation(ruleTN, new object[] { "b", "c", "d" });

            c_a.InitializeOutput("b");
            c_b.InitializeOutput(null);
            c_ab.InitializeOutput("c");
            c_bc.InitializeOutput(null);
            c_abc.InitializeOutput("d");
            c_bcd.InitializeOutput(null);
        }
 public void InitTestContext()
 {
     ruleT1 = new TestRuleT1();
     ruleDependent = new OtherRuleT1();
     transformation = new MockTransformation(ruleT1, ruleDependent);
     transformation.Initialize();
     context = new MockContext(transformation);
 }
 public void InitTestContext()
 {
     ruleT1         = new TestRuleT1();
     ruleDependent  = new OtherRuleT1();
     transformation = new MockTransformation(ruleT1, ruleDependent);
     transformation.Initialize();
     context = new MockContext(transformation);
 }
Beispiel #6
0
        public void InitTestContext()
        {
            ruleT1 = new TestRuleT1();
            ruleDependent = new OtherRuleT1();
            transformation = new MockTransformation(ruleT1, ruleDependent);
            transformation.Initialize();
            context = new MockContext(transformation);

            dependency = new SingleDependency();

            dependency.BaseTransformation = ruleT1;
            dependency.DependencyTransformation = ruleDependent;
            dependency.ExecuteBefore = true;

            c_Test = new MockComputation(new object[] { "a" }, ruleT1, context, "b");
            c_Dependent = new MockComputation(new object[] { new Dummy() }, ruleDependent, context, null);

            context.Computations.Add(c_Test);
            context.Computations.Add(c_Dependent);
        }
Beispiel #7
0
        public void InitTestContext()
        {
            ruleT1         = new TestRuleT1();
            ruleDependent  = new OtherRuleT1();
            transformation = new MockTransformation(ruleT1, ruleDependent);
            transformation.Initialize();
            context = new MockContext(transformation);

            dependency = new MultipleDependency();

            dependency.BaseTransformation       = ruleT1;
            dependency.DependencyTransformation = ruleDependent;
            dependency.ExecuteBefore            = true;

            c_Test      = new MockComputation(new object[] { "a" }, ruleT1, context, "b");
            c_Dependent = new MockComputation(new object[] { new Dummy() }, ruleDependent, context, new Dummy());

            context.Computations.Add(c_Test);
            context.Computations.Add(c_Dependent);
        }