Exemplo n.º 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));
        }
Exemplo n.º 2
0
        public void NonPositive_MultiplePreconditionsMethod_DoesNotThrowIfArgsNonPositive()
        {
            var demo = new NonPositiveConsumer();

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