Exemple #1
0
        void Multiply_NullMultiplicands_ReturnsNull()
        {
            var sut    = new sut.Multiplier();
            var result = sut.Multiply(null);

            Assert.Null(result);
        }
Exemple #2
0
        void Multiply_EmptyMultiplicands_ReturnsNull()
        {
            var sut    = new sut.Multiplier();
            var result = sut.Multiply(new List <int>());

            Assert.Null(result);
        }
Exemple #3
0
        void Multiply_SingleMultiplicand_ReturnsNull()
        {
            var sut    = new sut.Multiplier();
            var result = sut.Multiply(new List <int> {
                42
            });

            Assert.Null(result);
        }
Exemple #4
0
        void Multiply_ValidMultiplicands_ReturnsProduct(
            IList <int> multiplicands,
            int expectedProduct
            )
        {
            var sut    = new sut.Multiplier();
            var result = sut.Multiply(multiplicands);

            Assert.NotNull(result);
            Assert.Equal(expectedProduct, result.Value);
        }