Exemplo n.º 1
0
 public void RulesCanBeCombinedUsingTheXorOperator()
 {
     Assert.That(aRuleThatIsTrue.Xor(aRuleThatIsTrue).IsFalseFor(new AnyClass()));
     Assert.That(aRuleThatIsTrue.Xor(aRuleThatIsFalse).IsTrueFor(new AnyClass()));
     Assert.That(aRuleThatIsFalse.Xor(aRuleThatIsTrue).IsTrueFor(new AnyClass()));
     Assert.That(aRuleThatIsFalse.Xor(aRuleThatIsFalse).IsFalseFor(new AnyClass()));
 }
Exemplo n.º 2
0
        public void AnXorRuleCanBeDescribed()
        {
            var rule = aRuleThatIsTrue.Xor(aRuleThatIsFalse);

            var description = describer.Describe(rule);

            Assert.That(description, Is.EqualTo("(Always True XOR Always False)"));
        }
        public void AnXorRuleCanBeEvaluatedAndDescribed()
        {
            var rule = aRuleThatIsTrue.Xor(aRuleThatIsFalse);

            var description = describer.Describe(rule);

            Assert.That(description, Is.EqualTo("Always True[T] XOR[T] Always False[F]"));
        }