static void Main(string[] args) { double[] mass = Array(args); var calc = new Core.Calc(); switch (args[0]) { case "sum": Console.WriteLine(calc.Sum(mass)); break; case "sub": Console.WriteLine(calc.Sub(mass)); break; case "pow": Console.WriteLine(calc.Pow(mass)); break; case "multi": Console.WriteLine(calc.Multi(mass)); break; default: Console.WriteLine("Что-то пошло не так"); break; } Console.Read(); }
public void TestMulti() { //Arrange var calc = new Core.Calc(); var Sub = 60; //act var result = calc.Multi(new[] { 5.0, 4.0, 3.0 }); //Assent Assert.AreEqual(Sub, result); }