public void Negation() { ISpecification <int> spec = new LessThan10().Not(); Assert.That(spec.IsSatisfiedBy(5), Is.False); Assert.That(spec.IsSatisfiedBy(11), Is.True); }
public void Satisfaction() { var spec = new LessThan10(); Assert.That(spec.IsSatisfiedBy(5), Is.True); Assert.That(spec.IsSatisfiedBy(11), Is.False); }
public void MoreThan5_And_LessThan10() { ISpecification <int> lessThan10 = new LessThan10(); ISpecification <int> moreThan5 = new MoreThan5(); ISpecification <int> subject = lessThan10.And(moreThan5); Assert.That(subject, Must.Be.SatisfiedBy(7)); Assert.That(subject, Must.Not.Be.SatisfiedBy(3).Or(13)); }