Example #1
0
        public void NonPositive_PostconditionMethod_ThrowsIfPositive()
        {
            var demo = new NonPositiveConsumer();

            Assert.Throws <PostconditionException>(() =>
                                                   demo.PostconditionMethod(1));
        }
Example #2
0
        public void NonPositive_PostconditionMethod_DoesNotThrowIf0()
        {
            var demo = new NonPositiveConsumer();

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