示例#1
0
        public void EncapsulatedExpr_NegatedMoreThan5_ExpectedBehavior()
        {
            var subject = new MoreThan5ExpSpecSubject().Not();

            Assert.That(subject, Must.Not.Be.SatisfiedBy(6));
            Assert.That(subject, Must.Be.SatisfiedBy(3));
        }
示例#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));
        }