Ejemplo n.º 1
0
        public void OrNot_ReturnsDisjunction_WithNegationRight()
        {
            var spec1 = new IntegerGreaterThanZero();
            var spec2 = new IntegerLessThanZero();
            var conjoinedSpec = spec1.OrNot(spec2);

            Assert.That(conjoinedSpec, Is.TypeOf<Disjunction<int>>());
            Assert.That(conjoinedSpec, Has.Property("Left").EqualTo(spec1));
            Assert.That(conjoinedSpec, Has.Property("Right").TypeOf<Negation<int>>());
            Assert.That(conjoinedSpec, Has.Property("Right").With.Property("Inner").EqualTo(spec2));
        }