Exemple #1
0
        public void AverageSimpleInput()
        {
            List <int> simpleList = new List <int>()
            {
                1, 2, 3, 4, 4
            };
            double actual   = MathCalculator.Average(simpleList);
            double expected = 2.8;

            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
        public void AverageWithEmptyListShouldThrowArgumentException()
        {
            List <int> emptyList = new List <int>();

            MathCalculator.Average(emptyList);
        }
Exemple #3
0
 public void AverageWithNullInputShouldThrowArgumentException()
 {
     MathCalculator.Average(null);
 }