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 MaxTest() { ArrayCalc calc = new ArrayCalc(); double[] n = { 1.0, 2.0, 3.3, 5.5, 6.3, -4.5, 12.0 }; double expected = 12.0; // act double actual = calc.Max(n); //assert Assert.AreEqual(expected, actual); }