Exemplo n.º 1
0
            public void ValueChanged_DifferentHash()
            {
                ProjectVersionId vo = Freeze.GuidOne;
                var hash1           = vo.GetHashCode();

                vo = Freeze.GuidFortyTwo;

                var hash2 = vo.GetHashCode();

                using (new AssertionScope())
                {
                    hash1.Should().NotBe(hash2);

                    hash1.Should().Be(-92868338);
                    hash2.Should().Be(-1183387378);
                }
            }
Exemplo n.º 2
0
            public void OneObject_UniqueHash()
            {
                ProjectVersionId vo = Freeze.GuidOne;

                var hash = vo.GetHashCode();

                hash.Should().Be(-92868338);
            }
Exemplo n.º 3
0
            public void TwoObjectsSameValue_SameHashes()
            {
                ProjectVersionId vo1 = Freeze.GuidFortyTwo;
                ProjectVersionId vo2 = Freeze.GuidFortyTwo;

                var hash1 = vo1.GetHashCode();
                var hash2 = vo2.GetHashCode();

                using (new AssertionScope())
                {
                    hash1.Should().Be(hash2);

                    hash1.Should().Be(-1183387378);
                    hash2.Should().Be(-1183387378);
                }
            }
Exemplo n.º 4
0
            public void TwoObjects_UniqueHash()
            {
                ProjectVersionId vo1 = Freeze.GuidOne;
                ProjectVersionId vo2 = Freeze.GuidTwo;

                var hash1 = vo1.GetHashCode();
                var hash2 = vo2.GetHashCode();

                using (new AssertionScope())
                {
                    hash1.Should().NotBe(hash2);

                    hash1.Should().Be(-92868338);
                    hash2.Should().Be(-109645554);
                }
            }