static void Main(string[] args) { ArrayCalc calc = new ArrayCalc(); double[] n = { 1.0, 2.0, 3.3, 5.5, 6.3, -4.5, 12.0 }; Console.WriteLine(calc.Sum(n)); Console.WriteLine(calc.AVG(n)); Console.WriteLine(calc.Max(n)); Console.WriteLine(calc.Min(n)); }
public void SumTest() { ArrayCalc calc = new ArrayCalc(); double[] n = { 1.0, 2.0, 3.3, 5.5, 6.3, -4.5, 12.0 }; double expected = 25.60; // act double actual = calc.Sum(n); //assert Assert.AreEqual(expected, actual); }