public void GivenASpecificationTheTheExpectedOutcomeIsReturned(bool expected)
        {
            var  specification = new TestableSpecification(expected);
            bool outcome       = specification.IsSatisfiedBy(-2);

            Assert.Equal(expected, outcome);
        }
Exemplo n.º 2
0
        public void GivenASpecificationTheExpressionReturnedMatchesTheOutcomeOfIsSatisifiedBy(bool expected)
        {
            var  specification = new TestableSpecification(expected);
            bool isSatisified  = specification.IsSatisfiedBy(-2);

            bool outcome = specification
                           .ToExpression()
                           .Compile()
                           .Invoke(-2);

            Assert.Equal(expected, outcome);
            Assert.Equal(isSatisified, outcome);
        }