public void ProductMultipleIntegers()
        {
            IntegerTuple integerTuple = new IntegerTuple(1, 2, 3);
            int          expected     = 1 * 2 * 3;

            int actual = integerTuple.GetProduct();

            Assert.AreEqual(expected, actual);
        }
        public void ProductEmptyTuple()
        {
            IntegerTuple integerTuple = new IntegerTuple();
            int          expected     = 1;

            int actual = integerTuple.GetProduct();

            Assert.AreEqual(expected, actual);
        }
Beispiel #3
0
        public void SumOfTwelve()
        {
            int          sum      = 12;
            IntegerTuple triplet  = Pythagorean.GetTripletWithSumOf(sum);
            List <int>   expected = new List <int> {
                3, 4, 5
            };

            List <int> actual = triplet.ToList();


            CollectionAssert.AreEqual(expected, actual);
        }