예제 #1
0
파일: Planner.cs 프로젝트: foamliu/NPlanner
        public void ConjunctionionTest_Intersect()
        {
            string      literal1 = "ON (b3, Table) & ON (b2, b3) & ON (b1, b2)";
            Conjunction conj1    = new Conjunction(literal1);

            string      literal2 = "ON (b1, b2) & ON (b2, b3) & ON (b3, Table)";
            Conjunction conj2    = new Conjunction(literal2);

            Assert.IsTrue(conj1.Intersect(conj2));
            Assert.IsTrue(conj2.Intersect(conj1));

            string      literal3 = "ON (b1, b3) & Clear (Table) & Clear (b1)";
            Conjunction conj3    = new Conjunction(literal3);

            Assert.IsFalse(conj1.Intersect(conj3));
            Assert.IsFalse(conj3.Intersect(conj1));
        }