示例#1
0
        public void NegativeOneAddedToOneThrowsException()
        {
            // arrange
            var one      = 1;
            var addition = new Addition();

            // act
            Assert.Throws <ArgumentOutOfRangeException>(() => addition.AddTwoNonZeroPositiveIntegers(-1, 1));
        }
示例#2
0
        public void OneIsNonZeroPositiveAndOneAddedToOneIsTwo()
        {
            // arrange
            var one      = 1;
            var addition = new Addition();

            // act
            var result = addition.AddTwoNonZeroPositiveIntegers(one, one);

            // assert
            Assert.Equal(2, result);
        }