public void GivenASpecificationTheTheExpectedOutcomeIsReturned(bool expected) { var specification = new TestableSpecification(expected); bool outcome = specification.IsSatisfiedBy(-2); Assert.Equal(expected, outcome); }
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); }