Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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);
        }