コード例 #1
0
        public void Negative_NullablePreconditionMethod_ThrowsIfPositive()
        {
            var demo = new NegativeConsumer();

            Assert.Throws <PreconditionException>(() =>
                                                  demo.PreconditionNullableMethod(1));
        }
コード例 #2
0
        public void Negative_NullablePreconditionMethod_DoesNotThrowIfNull()
        {
            var demo = new NegativeConsumer();

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