public void ValueChanged_DifferentHash() { IssueId vo = Freeze.GuidOne; var hash1 = vo.GetHashCode(); vo = Freeze.GuidFortyTwo; var hash2 = vo.GetHashCode(); using (new AssertionScope()) { hash1.Should().NotBe(hash2); hash1.Should().Be(-92871782); hash2.Should().Be(-1183390822); } }
public void OneObject_UniqueHash() { IssueId vo = Freeze.GuidOne; var hash = vo.GetHashCode(); hash.Should().Be(-92871782); }
public void TwoObjectsSameValue_SameHashes() { IssueId vo1 = Freeze.GuidFortyTwo; IssueId vo2 = Freeze.GuidFortyTwo; var hash1 = vo1.GetHashCode(); var hash2 = vo2.GetHashCode(); using (new AssertionScope()) { hash1.Should().Be(hash2); hash1.Should().Be(-1183390822); hash2.Should().Be(-1183390822); } }
public void TwoObjects_UniqueHash() { IssueId vo1 = Freeze.GuidOne; IssueId vo2 = Freeze.GuidTwo; var hash1 = vo1.GetHashCode(); var hash2 = vo2.GetHashCode(); using (new AssertionScope()) { hash1.Should().NotBe(hash2); hash1.Should().Be(-92871782); hash2.Should().Be(-109648998); } }