Esempio n. 1
0
        public void NonNegative_PreconditionMethod_ThrowsIfNegative()
        {
            var demo = new NonNegativeConsumer();

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

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