Beispiel #1
0
        public void _3_01_should_construct_truth_tables_for_logical_expressions()
        {
            var expected = new List <(bool, bool, bool)>
            {
                (true, false, true),
                (true, true, true),
                (false, false, false),
                (false, true, false),
            };

            var actual = LogicAndCodes._3_01((a, b) => LogicalPredicates.And(a, LogicalPredicates.Or(a, b)));

            CollectionAssert.AreEqual(expected, actual);
        }
Beispiel #2
0
 public static bool And(this bool a, bool b)
 {
     return(LogicalPredicates.And(a, b));
 }