Esempio n. 1
0
        public void ConstraintsWithEquivalentKeysAndValuesHaveTheSameHashCode()
        {
            var mcd1 = new CompositionContract(s_defaultContractType, null, new Dictionary <string, object> {
                { "A", new[] { "B" } }
            });
            var mcd2 = new CompositionContract(s_defaultContractType, null, new Dictionary <string, object> {
                { "A", new[] { "B" } }
            });

            Assert.Equal(mcd1.GetHashCode(), mcd2.GetHashCode());
        }
Esempio n. 2
0
 public void Equals_Object_ReturnsExpected(CompositionContract contract, object other, bool expected)
 {
     Assert.Equal(expected, contract.Equals(other));
     Assert.Equal(contract.GetHashCode(), contract.GetHashCode());
 }
Esempio n. 3
0
 public void ConstraintsWithEquivalentKeysAndValuesHaveTheSameHashCode()
 {
     var mcd1 = new CompositionContract(s_defaultContractType, null, new Dictionary<string, object> { { "A", new[] { "B" } } });
     var mcd2 = new CompositionContract(s_defaultContractType, null, new Dictionary<string, object> { { "A", new[] { "B" } } });
     Assert.Equal(mcd1.GetHashCode(), mcd2.GetHashCode());
 }