Exemplo n.º 1
0
        public void Positive_PostconditionMethod_ThrowsIfNegative()
        {
            var demo = new PositiveConsumer();

            Assert.Throws <PostconditionException>(() =>
                                                   demo.PostconditionMethod(-1));
        }
Exemplo n.º 2
0
        public void Positive_PostconditionMethod_DoesNotThrowIfPositive()
        {
            var demo = new PositiveConsumer();

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