コード例 #1
0
        public void TestInvalidJoinFlowRule1()
        {
            string flowRuleName = "csattribute1+csattribute2+csattribute3>>xform1>>xform2>>mvattribute";

            try
            {
                FlowRuleParameters frp = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Join);
                Assert.Fail("The FRP did not throw the expected exception");
            }
            catch { }
        }
コード例 #2
0
        public void TestInvalidLoopbackOnJoin()
        {
            string flowRuleName = "csattribute1>>loopback";

            try
            {
                FlowRuleParameters frp = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Export);
                Assert.Fail("The FRP did not throw the expected exception");
            }
            catch { }
        }
コード例 #3
0
        public void TestInvalidLoopbackPositionOnExport()
        {
            string flowRuleName = "csattribute1<<xform1<<loopback<<mvattribute";

            try
            {
                FlowRuleParameters frp = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Export);
                Assert.Fail("The FRP did not throw the expected exception");
            }
            catch { }
        }
コード例 #4
0
        public void TestInvalidExportFlowRule1()
        {
            string flowRuleName = "csattribute1+csattribute2+csattribute3<<xform1<<xform2<<";

            try
            {
                FlowRuleParameters frp = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Export);
                Assert.Fail("The FRP did not throw the expected exception");
            }
            catch { }
        }
コード例 #5
0
        public void TestMultiAttributeJoinFlowRule()
        {
            string             flowRuleName = "csattribute1+csattribute2+csattribute3>>xform1";
            FlowRuleParameters frp          = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Join);

            CollectionAssert.AreEqual(new List <string>()
            {
                "csattribute1", "csattribute2", "csattribute3"
            }, frp.SourceAttributeNames);

            Assert.AreEqual(1, frp.Transforms.Count);
            Assert.AreEqual("xform1", frp.Transforms.First().ID);
        }
コード例 #6
0
        public void TestMultiAttributeMultiTransformJoinFlowRule()
        {
            string             flowRuleName = "csattribute1+csattribute2+csattribute3>>xform1>>xform2";
            FlowRuleParameters frp          = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Join);

            CollectionAssert.AreEqual(new List <string>()
            {
                "csattribute1", "csattribute2", "csattribute3"
            }, frp.SourceAttributeNames);
            CollectionAssert.AreEqual(new List <string>()
            {
                "xform1", "xform2"
            }, frp.Transforms.Select(t => t.ID).ToList());
        }
コード例 #7
0
        public void TestMultiAttributeExportFlowRule()
        {
            string             flowRuleName = "csattribute<<xform1<<mvattribute1+mvattribute2+mvattribute3";
            FlowRuleParameters frp          = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Export);

            Assert.AreEqual("csattribute", frp.TargetAttributeName);
            CollectionAssert.AreEqual(new List <string>()
            {
                "mvattribute3", "mvattribute2", "mvattribute1"
            }, frp.SourceAttributeNames);

            Assert.AreEqual(1, frp.Transforms.Count);
            Assert.AreEqual("xform1", frp.Transforms.First().ID);
        }
コード例 #8
0
        public void TestAlias2FlowRule()
        {
            string             flowRuleName = "alias2";
            FlowRuleParameters frp          = new FlowRuleParameters(this.config, flowRuleName, FlowRuleType.Import);

            Assert.AreEqual("mvattribute", frp.TargetAttributeName);
            CollectionAssert.AreEqual(new List <string>()
            {
                "csattribute"
            }, frp.SourceAttributeNames);

            Assert.AreEqual(1, frp.Transforms.Count);
            Assert.AreEqual("xform2", frp.Transforms.First().ID);
        }