示例#1
0
        public void NonPositive_NullablePreconditionMethod_ThrowsIfPositive()
        {
            var demo = new NonPositiveConsumer();

            Assert.Throws <PreconditionException>(() =>
                                                  demo.PreconditionNullableMethod(1));
        }
示例#2
0
        public void NonPositive_NullablePreconditionMethod_DoesNotThrowIfNull()
        {
            var demo = new NonPositiveConsumer();

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