public void GetHashCodeOfNullSutThrows()
 {
     // Fixture setup
     var sut = new MemberInfoNameComparer();
     // Exercise system and verify outcome
     Assert.Throws<ArgumentNullException>(() =>
         sut.GetHashCode(null));
     // Teardown
 }
예제 #2
0
        public void GetHashCodeOfNullSutThrows()
        {
            // Fixture setup
            var sut = new MemberInfoNameComparer();

            // Exercise system and verify outcome
            Assert.Throws <ArgumentNullException>(() =>
                                                  sut.GetHashCode(null));
            // Teardown
        }
        public void GetHashCodeOfNullSutShouldNotThrowAsExceptionIsNotExpectedThere()
        {
            // Fixture setup
            var sut = new MemberInfoNameComparer();

            // Exercise system and verify outcome
            Assert.Null(Record.Exception(() =>
                                         sut.GetHashCode(null)));
            // Teardown
        }