Ejemplo n.º 1
0
        public void NonPositive_PostconditionMethod_ThrowsIfPositive()
        {
            var demo = new NonPositiveConsumer();

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

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