Esempio n. 1
0
        public void NotEquals()
        {
            SqlInt32 x;
            SqlInt32 y;

            x = new SqlInt32(5);
            y = SqlInt32.Null;

            Assert.Equal(x != y, SqlBoolean.Null);
            Assert.Equal(SqlInt32.NotEquals(x, y), SqlBoolean.Null);

            y = new SqlInt32(5);
            Assert.Equal(x != y, SqlBoolean.False);
            Assert.Equal(SqlInt32.NotEquals(x, y), SqlBoolean.False);

            y = new SqlInt32(6);
            Assert.Equal(x != y, SqlBoolean.True);
            Assert.Equal(SqlInt32.NotEquals(x, y), SqlBoolean.True);
        }
Esempio n. 2
0
        public void NotEquals()
        {
            SqlInt32 x;
            SqlInt32 y;

            x = new SqlInt32(5);
            y = SqlInt32.Null;

            Assert.AreEqual(x != y, SqlBoolean.Null, "Not Equals operator does not return null when one or both of the parameters is Null.");
            Assert.AreEqual(SqlInt32.NotEquals(x, y), SqlBoolean.Null, "Not Equals function does not return null when one or both of the parameters is Null.");

            y = new SqlInt32(5);
            Assert.AreEqual(x != y, SqlBoolean.False, "Not Equals operator does not return false when x == y.");
            Assert.AreEqual(SqlInt32.NotEquals(x, y), SqlBoolean.False, "Not Equals function does not return false when x == y.");

            y = new SqlInt32(6);
            Assert.AreEqual(x != y, SqlBoolean.True, "Not Equals operator does not return true when x != y.");
            Assert.AreEqual(SqlInt32.NotEquals(x, y), SqlBoolean.True, "Not Equals function does not return true when x != y.");
        }