Example #1
0
        public void NonPositive_MultiplePreconditionsMethod_ThrowsIfAnyArgPositive()
        {
            var demo = new NonPositiveConsumer();

            Assert.Throws <PreconditionException>(() =>
                                                  demo.MultiplePreconditionsMethod(1, 0));

            Assert.Throws <PreconditionException>(() =>
                                                  demo.MultiplePreconditionsMethod(0, 1));
        }
Example #2
0
        public void NonPositive_MultiplePreconditionsMethod_DoesNotThrowIfArgsNonPositive()
        {
            var demo = new NonPositiveConsumer();

            Assert.DoesNotThrow(() =>
                                demo.MultiplePreconditionsMethod(-1, 0));
        }