コード例 #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);
        }
コード例 #2
0
        public void AverageWithEmptyListShouldThrowArgumentException()
        {
            List <int> emptyList = new List <int>();

            MathCalculator.Average(emptyList);
        }
コード例 #3
0
 public void AverageWithNullInputShouldThrowArgumentException()
 {
     MathCalculator.Average(null);
 }