Beispiel #1
0
        public void Fam_2()
        {
            Facts.Reset();
            Facts.Assert(p2, "Fam.FamilyRelationship", p1, "Partner by civil union");
            bool result = Fam.InCivilUnion(p1, p2).IsTrue;

            Assert.AreEqual(true, result);
        }
Beispiel #2
0
        public void Fam_4()
        {
            Facts.Reset();
            Facts.Assert(p2, "Fam.FamilyRelationship", p1, "Something other than civil union...");
            bool result = Fam.InCivilUnion(p1, p2).IsTrue;

            Assert.AreEqual(false, result);
        }
        public void FactOrder4b()
        {
            Facts.Reset();
            Facts.GetUnknowns = true;
            Tbool theRule = (A() & B()) | C();

            Assert.AreEqual("A B C", ShowUnknownTest());
        }
        public void FactOrder3a()
        {
            Facts.Reset();
            Facts.GetUnknowns = true;
            Tbool theRule = A() & !B();

            Assert.AreEqual("A B", ShowUnknownTest());
        }
        public void FactOrder3b()
        {
            Facts.Reset();
            Facts.GetUnknowns = true;
            Facts.Assert(p1, "B", p2, false);
            Tbool theRule = A() & !B();

            Assert.AreEqual("A", ShowUnknownTest());
        }
        public void FactOrder1d()
        {
            Facts.Reset();
            Facts.GetUnknowns = true;
            Facts.Assert(p1, "C", p2, true);
            Tbool theRule = A() & B() & C();

            Assert.AreEqual("A B", ShowUnknownTest());
        }
        public void FactOrder5a_lazy()
        {
            Hval h = new Hval(null, Hstate.Null);
            Tnum u = new Tnum(h);

            Facts.Reset();
            Facts.GetUnknowns = true;
            Tnum theRule = Switch <Tnum>(() => A(), () => X(),
                                         () => B(), () => Y(),
                                         () => u);

            Assert.AreEqual("A", ShowUnknownTest());
        }