예제 #1
0
        public void Selection()
        {
            var criteria = (Expression<Func<int, bool>>)(x => x > 0);
            var negatedSpec = new Proposition<int>(criteria);

            Assert.That(negatedSpec.IsSatisfiedBy(1), Is.True);
            Assert.That(negatedSpec.IsSatisfiedBy(0), Is.False);
            Assert.That(negatedSpec.IsSatisfiedBy(-1), Is.False);
        }