public void add_test()
        {
            const int a = 1;
            const int b = 2;

            var adder = new Adder();
            var c = adder.Add(a, b);

            Assert.AreEqual(3, c);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.Write("Enter your first number: ");
            var firstNum = Convert.ToInt32(Console.ReadLine());
            Console.Write("Enter your second number: ");
            var secondNum = Convert.ToInt32(Console.ReadLine());

            var adder = new Adder();
            Console.WriteLine("Your two numbers add up to: " + adder.Add(firstNum, secondNum));

            Console.ReadLine();
        }