public void RulesCanBeCombinedUsingTheOrOperator() { Assert.That(aRuleThatIsTrue.Or(aRuleThatIsTrue).IsTrueFor(new AnyClass())); Assert.That(aRuleThatIsTrue.Or(aRuleThatIsFalse).IsTrueFor(new AnyClass())); Assert.That(aRuleThatIsFalse.Or(aRuleThatIsTrue).IsTrueFor(new AnyClass())); Assert.That(aRuleThatIsFalse.Or(aRuleThatIsFalse).IsFalseFor(new AnyClass())); }
public void NeededParenthesisForOrAreIncluded() { var anOrRule = aRuleThatIsTrue.Or(aRuleThatIsFalse); var anAndRule = aRuleThatIsTrue.And(aRuleThatIsTrue); var rule = anOrRule.And(anAndRule); var description = describer.Describe(rule); Assert.That(description, Is.EqualTo("(Always True OR Always False) AND Always True AND Always True")); }
public void AnOrRuleCanBeDescribed() { var rule = aRuleThatIsTrue.Or(aRuleThatIsFalse); var description = describer.Describe(rule); Assert.That(description, Is.EqualTo("(Always True OR Always False)")); }
public void AnOrRuleCanBeEvaluatedAndDescribed() { var rule = aRuleThatIsTrue.Or(aRuleThatIsFalse); var description = describer.Describe(rule); Assert.That(description, Is.EqualTo("Always True[T] OR[T] Always False[F]")); }