public void GetHashCode_When_TargetisNull_Then_ResultShouldNotBe0() { var testee = new TargetEqualityWeakReference <Target>(new Target()); var result = testee.GetHashCode(); result.Should().NotBe(0); }
public void Equals_When_Target1IsNull_Then_ResultShouldBeFalse() { var target2 = new Target(); var testee = new TargetEqualityWeakReference <Target>(null !); var testee2 = new TargetEqualityWeakReference <Target>(target2); var result = testee.Equals(testee2); result.Should().BeFalse(); }
public void Equals_When_TargetsAreTheSame_Then_ResultShouldBeTrue() { var target = new Target(); var testee = new TargetEqualityWeakReference <Target>(target); var testee2 = new TargetEqualityWeakReference <Target>(target); var result = testee.Equals(testee2); result.Should().BeTrue(); }