Пример #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));
        }