public void Should_display_formula_correctly()
        {
            // Arrange
            Formula formula = TestFormula.GetTestFormula();

            // Act
            string formulaAsString = formula.ToString();

            // Assert
            Assert.AreEqual(formulaAsString, "(A ∨ B) ∧ (A ∨ ¬C)");
        }
        public void Should_return_all_models_for_satisfiable_formula()
        {
            Formula       formula = TestFormula.GetTestFormula();
            List <string> models  = new List <string>();

            bool isSatisfiable = formula.IsSatisfiable(models);

            Assert.IsTrue(isSatisfiable);
            Assert.IsTrue(models.Contains("A = False, B = True, C = False"));
            Assert.IsTrue(models.Contains("A = True, B = False, C = False"));
            Assert.IsTrue(models.Contains("A = True, B = False, C = True"));
            Assert.IsTrue(models.Contains("A = True, B = True, C = False"));
            Assert.IsTrue(models.Contains("A = True, B = True, C = True"));
            Assert.IsFalse(models.Contains("A = False, B = False, C = False"));
            Assert.IsFalse(models.Contains("A = False, B = False, C = True"));
            Assert.IsFalse(models.Contains("A = False, B = True, C = True"));
        }
        public void Should_classify_formula_as_satisfiable()
        {
            Formula formula = TestFormula.GetTestFormula();

            Assert.IsTrue(formula.IsSatisfiable(null));
        }