Exemple #1
0
        public void NonPositive_NullablePostconditionMethod_ThrowsIfPositive()
        {
            var demo = new NonPositiveConsumer();

            Assert.Throws <PostconditionException>(() =>
                                                   demo.PostconditionNullableMethod(1));
        }
Exemple #2
0
        public void NonPositive_NullablePostconditionMethod_DoesNotThrowIfNull()
        {
            var demo = new NonPositiveConsumer();

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