private void CopyFromMultiKeyMapToDuplicateHelper <T, K, V>(K[] keys, V[] values) where K : class, IEnumerable <T> { var source = TestHelpers.CreateMultiKeyMap <T, K, V>(keys, values); var target = TestHelpers.CreateMultiKeyMap <T, K, V>(keys, values); Action act = () => MultiKeyMapCopyExtensions.CopyFrom(target, source); act.ShouldThrow <ArgumentException>(); }
private void CopyFromDictionaryToEmptyHelper <T, K, V>(K[] keys, V[] values) where K : class, IEnumerable <T> { var source = TestHelpers.CreateDictionary <T, K, V>(keys, values); var target = MultiKeyMaps.CreateMultiKeyDictionary <T, K, V>(); var result = MultiKeyMapCopyExtensions.CopyFrom(target, source); result.Should().NotBeNull().And.BeSameAs(target).And.Equal(source); }
private void OfMultiKeyMapToDuplicateHelper <T, K, V>(K[] keys, V[] values) where K : class, IEnumerable <T> { var source = TestHelpers.CreateMultiKeyMap <T, K, V>(keys, values); var target = TestHelpers.CreateMultiKeyMap <T, K, V>(keys, values); var result = MultiKeyMapCopyExtensions.Of(target, source); result.Should().NotBeNull().And.BeSameAs(target).And.Equal(source); }