예제 #1
0
        public void NumberSwapArithmeticEqual()
        {
            int a = 3;
            int b = 3;

            NumberSwap.NumberSwapArithmetic(ref a, ref b);
            Assert.AreEqual(a, 3);
            Assert.AreEqual(b, 3);
        }
예제 #2
0
        public void NumberSwapArithmeticGreaterLesserNegative()
        {
            int a = -9;
            int b = -11;

            NumberSwap.NumberSwapArithmetic(ref a, ref b);
            Assert.AreEqual(a, -11);
            Assert.AreEqual(b, -9);
        }
예제 #3
0
        public void NumberSwapArithmeticGreaterLesser()
        {
            int a = 9;
            int b = 2;

            NumberSwap.NumberSwapArithmetic(ref a, ref b);
            Assert.AreEqual(a, 2);
            Assert.AreEqual(b, 9);
        }
예제 #4
0
        public void NumberSwapArithmeticLesserGreaterNegative()
        {
            int a = -10;
            int b = 8;

            NumberSwap.NumberSwapArithmetic(ref a, ref b);
            Assert.AreEqual(a, 8);
            Assert.AreEqual(b, -10);
        }
예제 #5
0
        public void NumberSwapArithmeticLesserGreater()
        {
            int a = 3;
            int b = 8;

            NumberSwap.NumberSwapArithmetic(ref a, ref b);
            Assert.AreEqual(a, 8);
            Assert.AreEqual(b, 3);
        }