public void ComparingNullToNullWillReturnTrue()
 {
     // Fixture setup
     var sut = new MemberInfoNameComparer();
     // Exercise system
     bool result = sut.Equals(null, null);
     // Verify outcome
     Assert.True(result, "Equals");
     // Teardown
 }
Beispiel #2
0
        public void ComparingNullToNullWillReturnTrue()
        {
            // Fixture setup
            var sut = new MemberInfoNameComparer();
            // Exercise system
            bool result = sut.Equals(null, null);

            // Verify outcome
            Assert.True(result, "Equals");
            // Teardown
        }
 public void ComparingIdenticalMembersWillReturnTrue()
 {
     // Fixture setup
     MemberInfo mi1 = typeof(DateTime).GetProperty("Ticks");
     MemberInfo mi2 = typeof(DateTime).GetProperty("Ticks");
     MemberInfoNameComparer sut = new MemberInfoNameComparer();
     // Exercise system
     bool result = sut.Equals(mi1, mi2);
     // Verify outcome
     Assert.True(result, "Equals");
     // Teardown
 }
 public void ComparingMemberToNullWillReturnFalse()
 {
     // Fixture setup
     MemberInfo nullMemberInfo = null;
     MemberInfo mi = typeof(DateTime).GetProperty("Ticks");
     MemberInfoNameComparer sut = new MemberInfoNameComparer();
     // Exercise system
     bool result = sut.Equals(nullMemberInfo, mi);
     // Verify outcome
     Assert.False(result, "Equals");
     // Teardown
 }
Beispiel #5
0
        public void ComparingIdenticalMembersWillReturnTrue()
        {
            // Fixture setup
            MemberInfo             mi1 = typeof(DateTime).GetProperty("Ticks");
            MemberInfo             mi2 = typeof(DateTime).GetProperty("Ticks");
            MemberInfoNameComparer sut = new MemberInfoNameComparer();
            // Exercise system
            bool result = sut.Equals(mi1, mi2);

            // Verify outcome
            Assert.True(result, "Equals");
            // Teardown
        }
Beispiel #6
0
        public void ComparingMemberToNullWillReturnFalse()
        {
            // Fixture setup
            MemberInfo             nullMemberInfo = null;
            MemberInfo             mi             = typeof(DateTime).GetProperty("Ticks");
            MemberInfoNameComparer sut            = new MemberInfoNameComparer();
            // Exercise system
            bool result = sut.Equals(nullMemberInfo, mi);

            // Verify outcome
            Assert.False(result, "Equals");
            // Teardown
        }