public void DetectsDifferentKeys() { var x = new Dictionary <string, AttributeValue> { { "key1", new AttributeValue("value1") }, { "key2", new AttributeValue("value2") } }; var y = new Dictionary <string, AttributeValue> { { "key1", new AttributeValue("value1") }, { "key3", new AttributeValue("value3") } }; var comparer = new DbKeyEqualityComparer(); comparer.Equals(x, y).ShouldBeFalse(); }
public void DetectsDuplicatesWithKeysInDifferentOrder() { var x = new Dictionary <string, AttributeValue> { { "key1", new AttributeValue("value1") }, { "key2", new AttributeValue("value2") } }; var y = new Dictionary <string, AttributeValue> { { "key2", new AttributeValue("value2") }, { "key1", new AttributeValue("value1") } }; var comparer = new DbKeyEqualityComparer(); comparer.Equals(x, y).ShouldBeTrue(); }