Esempio n. 1
0
        public void NonPositive_NullablePostconditionMethod_ThrowsIfPositive()
        {
            var demo = new NonPositiveConsumer();

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

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