Esempio n. 1
0
        public void GetHashCode_ToSelf_Equal()
        {
            // Arrange
            var target = new StringMatchRule("Name", StringMatchType.Suffix);

            // Act
            var hash1 = target.GetHashCode();
            var hash2 = target.GetHashCode();

            // Assert
            Assert.AreEqual(hash1, hash2);
        }
Esempio n. 2
0
        public void GetHashCode_ToDifferentType_Unequal()
        {
            // Arrange
            var target1 = new StringMatchRule("Name", StringMatchType.Suffix);
            var target2 = new StringMatchRule("Name", StringMatchType.Prefix);

            // Act
            var hash1 = target1.GetHashCode();
            var hash2 = target2.GetHashCode();

            // Assert
            Assert.AreNotEqual(hash1, hash2);
        }