Example #1
0
        public void EqualsShouldReturnFalseForAnInstanceWithDifferentRuleName([ManifestModel] ManifestValue value, Type aType)
        {
            var first  = new ManifestRuleIdentifier(value, aType, "One");
            var second = new ManifestRuleIdentifier(value, aType, "Two");

            Assert.That(first.Equals(second), Is.False);
        }
Example #2
0
        public void GetHashCodeShouldReturnSameResultForADifferentInstanceWithEqualPropertyValues([ManifestModel] ManifestValue value, Type aType, string aString)
        {
            var first  = new ManifestRuleIdentifier(value, aType, aString);
            var second = new ManifestRuleIdentifier(value, aType, aString);

            Assert.That(first.GetHashCode(), Is.EqualTo(second.GetHashCode()));
        }
Example #3
0
        public void GetHashCodeShouldReturnDifferentResultsForAnInstanceWithDifferentRuleName([ManifestModel] ManifestValue value, Type aType)
        {
            var first  = new ManifestRuleIdentifier(value, aType, "One");
            var second = new ManifestRuleIdentifier(value, aType, "Two");

            Assert.That(first.GetHashCode(), Is.Not.EqualTo(second.GetHashCode()));
        }
Example #4
0
        public void EqualsShouldReturnFalseForADifferentInstanceWithEqualPropertyValues([ManifestModel] ManifestValue value, Type aType, string aString)
        {
            var first  = new ManifestRuleIdentifier(value, aType, aString);
            var second = new ManifestRuleIdentifier(value, aType, aString);

            Assert.That(first.Equals(second), Is.True);
        }