示例#1
0
        public void Positive_NullablePostconditionMethod_ThrowsIfNegative()
        {
            var demo = new PositiveConsumer();

            Assert.Throws <PostconditionException>(() =>
                                                   demo.PostconditionNullableMethod(-1));
        }
示例#2
0
        public void Positive_NullablePostconditionMethod_DoesNotThrowIfNull()
        {
            var demo = new PositiveConsumer();

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