Exemple #1
0
 public void AND_Tests()
 {
     //Test all nine combos of inputs.
     Assert.AreEqual(TruthValue.Unknown, Op.AND(TruthValue.Unknown, TruthValue.Unknown), "AND(U,U) != U");
     Assert.AreEqual(TruthValue.Unknown, Op.AND(TruthValue.Unknown, TruthValue.True), "AND(U,T) != U");
     Assert.AreEqual(TruthValue.False, Op.AND(TruthValue.Unknown, TruthValue.False), "AND(U,F) != F");
     Assert.AreEqual(TruthValue.Unknown, Op.AND(TruthValue.True, TruthValue.Unknown), "AND(T,U) != U");
     Assert.AreEqual(TruthValue.True, Op.AND(TruthValue.True, TruthValue.True), "AND(T,T) != T");
     Assert.AreEqual(TruthValue.False, Op.AND(TruthValue.True, TruthValue.False), "AND(T,F) != F");
     Assert.AreEqual(TruthValue.False, Op.AND(TruthValue.False, TruthValue.Unknown), "AND(F,U) != F");
     Assert.AreEqual(TruthValue.False, Op.AND(TruthValue.False, TruthValue.True), "AND(F,T) != F");
     Assert.AreEqual(TruthValue.False, Op.AND(TruthValue.False, TruthValue.False), "AND(F,F) != F");
 }