示例#1
0
文件: TraceTest.cs 项目: wasowski/NMF
        public void Transformations_AbstractTrace_Resolve1()
        {
            Assert.AreEqual("b", trace.ResolveIn(ruleT1, new object[] { "a" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT1, new object[] { "b" }));
            Assert.AreEqual("c", trace.ResolveIn(ruleT2, new object[] { "a", "b" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT2, new object[] { "b", "c" }));
            Assert.AreEqual("d", trace.ResolveIn(ruleTN, new object[] { "a", "b", "c" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleTN, new object[] { "b", "c", "d" }));

            Assert.AreEqual(null, trace.ResolveIn(ruleT2, new object[] { "a" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT2, new object[] { "b" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleTN, new object[] { "a", "b" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleTN, new object[] { "b", "c" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT1, new object[] { "a", "b", "c" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT1, new object[] { "b", "c", "d" }));

            Assert.AreEqual(null, trace.ResolveIn(ruleTN, new object[] { "a" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleTN, new object[] { "b" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT1, new object[] { "a", "b" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT1, new object[] { "b", "c" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT2, new object[] { "a", "b", "c" }));
            Assert.AreEqual(null, trace.ResolveIn(ruleT2, new object[] { "b", "c", "d" }));
        }