示例#1
0
        public void testIsTrueOr()
        {
            Proposition tempOr = new Proposition(0, Operations.Disjunction, 1);

            bool?[] OrTT = { true, true };
            Assert.AreEqual(true, tempOr.IsTrue(OrTT), "T|T error");

            bool?[] OrTF = { true, false };
            Assert.AreEqual(true, tempOr.IsTrue(OrTF), "T|F error");

            bool?[] OrFT = { false, true };
            Assert.AreEqual(true, tempOr.IsTrue(OrTF), "F|T error");

            bool?[] OrFF = { false, false };
            Assert.AreEqual(false, tempOr.IsTrue(OrFF), "F|F error");
        }
示例#2
0
        // [TestMethod]
        public void testIsTrueBic()
        {
            Proposition tempBic = new Proposition(0, Operations.Biconditional, 1);

            bool?[] BicTT = { true, true };
            Assert.AreEqual(true, tempBic.IsTrue(BicTT), "T<=>T error");

            bool?[] BicTF = { true, false };
            Assert.AreEqual(false, tempBic.IsTrue(BicTF), "T<=>F error");

            bool?[] BicFT = { false, true };
            Assert.AreEqual(false, tempBic.IsTrue(BicFT), "F<=>T error");

            bool?[] BicFF = { false, false };
            Assert.AreEqual(true, tempBic.IsTrue(BicFF), "F<=>F error");
        }
示例#3
0
        public void testIsTrueAnd()
        {
            Proposition tempAnd = new Proposition(0, Operations.Conjunction, 1);

            bool?[] andTT = { true, true };
            Assert.AreEqual(true, tempAnd.IsTrue(andTT), "T&T error");

            bool?[] andTF = { true, false };
            Assert.AreEqual(false, tempAnd.IsTrue(andTF), "T&F error");

            bool?[] andFT = { false, true };
            Assert.AreEqual(false, tempAnd.IsTrue(andTF), "F&T error");

            bool?[] andFF = { false, false };
            Assert.AreEqual(false, tempAnd.IsTrue(andFF), "F&F error");
        }
示例#4
0
        public void testIsTrueImp()
        {
            Proposition tempImp = new Proposition(0, Operations.Implication, 1);

            bool?[] ImpTT = { true, true };
            Assert.AreEqual(true, tempImp.IsTrue(ImpTT), "T=>T error");

            bool?[] ImpTF = { true, false };
            Assert.AreEqual(false, tempImp.IsTrue(ImpTF), "T=>F error");

            bool?[] ImpFT = { false, true };
            Assert.AreEqual(true, tempImp.IsTrue(ImpFT), "F=>T error");

            bool?[] ImpFF = { false, false };
            Assert.AreEqual(true, tempImp.IsTrue(ImpFF), "F=>F error");
        }