コード例 #1
0
        public void Equals_WithNullArgument_ReturnsFalse()
        {
            SqlIdentifier first = new SqlIdentifier("a.ab");

            Assert.False(first.Equals((object)null));
            Assert.False(first.Equals((SqlIdentifier)null));
        }
コード例 #2
0
        public void Equals_WithArgumentOfDifferentType_ReturnsFalse()
        {
            SqlIdentifier first  = new SqlIdentifier("a.ab");
            string        second = "The rain in Spain falls mainly on the plain.";

            Assert.False(first.Equals(second));
            Assert.False(first.Equals((object)second));
        }
コード例 #3
0
        public void Equals_WithEqualArgument_ReturnsTrue()
        {
            int expected = new SqlIdentifier("[a].[ab].[abc]").GetHashCode();
            int actual   = new SqlIdentifier("a.ab.abc").GetHashCode();

            Assert.True(expected.Equals(actual));
            Assert.True(expected.Equals((object)actual));
        }
コード例 #4
0
        public void Equals_WithDifferentArgument_ReturnsFalse()
        {
            SqlIdentifier first  = new SqlIdentifier("a.ab");
            SqlIdentifier second = new SqlIdentifier("b.ab");

            Assert.False(first.Equals(second));
            Assert.False(first.Equals((object)second));
        }