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

            Assert.Throws <PostconditionException>(() =>
                                                   demo.PostconditionNullableMethod(-1));
        }
Ejemplo n.º 2
0
        public void NonNegative_NullablePostconditionMethod_DoesNotThrowIfNull()
        {
            var demo = new NonNegativeConsumer();

            Assert.DoesNotThrow(() =>
                                demo.PostconditionNullableMethod(null));
        }