예제 #1
0
        public void NonNegative_PostconditionMethod_ThrowsIfNegative()
        {
            var demo = new NonNegativeConsumer();

            Assert.Throws <PostconditionException>(() =>
                                                   demo.PostconditionMethod(-1));
        }
예제 #2
0
        public void NonNegative_PostconditionMethod_DoesNotThrowIf0()
        {
            var demo = new NonNegativeConsumer();

            Assert.DoesNotThrow(() =>
                                demo.PostconditionMethod(0));
        }