Exemplo n.º 1
0
        public void Negative_MultiplePreconditionsMethod_ThrowsIfAnyArgPositive()
        {
            var demo = new NegativeConsumer();

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

            Assert.Throws <PreconditionException>(() =>
                                                  demo.MultiplePreconditionsMethod(-1, 1));
        }
Exemplo n.º 2
0
        public void Negative_MultiplePreconditionsMethod_DoesNotThrowIfArgsNegative()
        {
            var demo = new NegativeConsumer();

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