Exemple #1
0
        public void TestSub()
        {
            // Assemble
            MyTesting.BasicOperations basicOperation = new MyTesting.BasicOperations();
            int expectiedResult = 7;

            //Act
            int actualResult = basicOperation.Sub(10, 6);

            // Assert
            Assert.AreNotEqual(expectiedResult, actualResult);
        }
Exemple #2
0
        public void TestMul()
        {
            // Assemble
            MyTesting.BasicOperations basicOperation = new MyTesting.BasicOperations();
            int expectiedResult = 12;

            //Act
            int actualResult = basicOperation.Mul(2, 6);

            // Assert
            Assert.AreEqual(expectiedResult, actualResult);
        }
Exemple #3
0
        public void TestDiv()
        {
            // Assemble
            MyTesting.BasicOperations basicOperation = new MyTesting.BasicOperations();
            int expectiedResult = 3;

            //Act
            int actualResult = basicOperation.Div(15, 5);

            // Assert
            Assert.AreEqual(expectiedResult, actualResult);
        }
Exemple #4
0
        public void TestAdd()
        {
            // Assemble
            MyTesting.BasicOperations basicOperation = new MyTesting.BasicOperations();
            int expectiedResult = 5;

            //Act
            int actualResult = basicOperation.Add(2, 3);

            // Assert
            Assert.AreEqual(expectiedResult, actualResult);
        }
Exemple #5
0
        static void Main(string[] agrs)
        {
            Console.WriteLine("Hello");

            BasicOperations basicOperations = new BasicOperations();

            Console.WriteLine("4 + 5 is {0}.", basicOperations.Add(4, 5));
            Console.WriteLine("5 * 4 is {0}.", basicOperations.Mul(5, 4));
            Console.WriteLine("15 / 5 is {0}.", basicOperations.Div(15, 5));
            Console.WriteLine("7 - 6 is {0}.", basicOperations.Sub(7, 6));

            ClassicPrograms classicProgram = new ClassicPrograms();

            Console.WriteLine("Is 4 Prime? {0}", classicProgram.IsPrime(9));
            Console.WriteLine("Is 5 odd {0}", classicProgram.IsOdd(5));
            Console.WriteLine("Is 3 Even? {0}", classicProgram.IsEven(3));

            Console.ReadKey();
        }