Пример #1
0
        public void SelectsDisjunction()
        {
            var spec1 = new IntegerGreaterThanZero();
            var spec2 = new IntegerEqualToZero();
            var disjoinedSpec = new Disjunction<int>(spec1, spec2);

            Assert.That(disjoinedSpec.IsSatisfiedBy(1), Is.True);
            Assert.That(disjoinedSpec.IsSatisfiedBy(0), Is.True);
            Assert.That(disjoinedSpec.IsSatisfiedBy(-1), Is.False);
        }