Example #1
0
        public void EncapsulatedExpr_LessThan10_ExpectedBehavior()
        {
            var subject = new LessThan10ExpSpecSubject();

            Assert.That(subject, Must.Be.SatisfiedBy(5));
            Assert.That(subject, Must.Not.Be.SatisfiedBy(11));
        }
Example #2
0
        public void EncapsulatedExpr_AndComposition_ExpectedBehavior()
        {
            var lessThan10 = new LessThan10ExpSpecSubject();
            var moreThan5  = new MoreThan5ExpSpecSubject();

            var subject = lessThan10.And(moreThan5);

            Assert.That(subject, Must.Be.SatisfiedBy(7));
            Assert.That(subject, Must.Not.Be.SatisfiedBy(3).Or(13));
        }