示例#1
0
        public void Negative_PreconditionMethod_ThrowsIfPositive()
        {
            var demo = new NegativeConsumer();

            Assert.Throws <PreconditionException>(() =>
                                                  demo.PreconditionMethod(1));
        }
示例#2
0
        public void Negative_PreconditionMethod_DoesNotThrowIfNegative()
        {
            var demo = new NegativeConsumer();

            Assert.DoesNotThrow(() =>
                                demo.PreconditionMethod(-1));
        }