Ejemplo n.º 1
0
        public void Add()
        {
            int a = 5;
            int b = 7;

            SqlInt32 x;
            SqlInt32 y;
            SqlInt32 z;

            x = new SqlInt32(a);
            y = new SqlInt32(b);
            z = x + y;
            Assert.Equal(z.Value, a + b);
            z = SqlInt32.Add(x, y);
            Assert.Equal(z.Value, a + b);
        }
Ejemplo n.º 2
0
        public void Add()
        {
            int a = 5;
            int b = 7;

            SqlInt32 x;
            SqlInt32 y;
            SqlInt32 z;

            x = new SqlInt32(a);
            y = new SqlInt32(b);
            z = x + y;
            Assert.AreEqual(z.Value, a + b, "Addition operator does not work correctly");
            z = SqlInt32.Add(x, y);
            Assert.AreEqual(z.Value, a + b, "Addition function does not work correctly");
        }