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()); }
public void Equals_Object_ReturnsExpected(CompositionContract contract, object other, bool expected) { Assert.Equal(expected, contract.Equals(other)); Assert.Equal(contract.GetHashCode(), contract.GetHashCode()); }
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()); }