예제 #1
0
        public void NonNegative_PreconditionMethod_ThrowsIfNegative()
        {
            var demo = new NonNegativeConsumer();

            Assert.Throws <PreconditionException>(() =>
                                                  demo.PreconditionMethod(-1));
        }
예제 #2
0
        public void NonNegative_PreconditionMethod_DoesNotThrowIf0()
        {
            var demo = new NonNegativeConsumer();

            Assert.DoesNotThrow(() =>
                                demo.PreconditionMethod(0));
        }