public void Keys_5Dimension(JaggedDictionary<int, string> sut, JaggedIndex5<int>[] keys, string value) { foreach (var key in keys) sut[key] = value; var list = sut.Keys.ToList(); Assert.Equal(keys.Length, list.Count); foreach (var item in list) { Assert.True(keys.Cast<IJaggedIndex<int>>().Contains(item)); } }
public void Enumerate_5Dimension(JaggedDictionary<int, string> sut, JaggedIndex5<int>[] keys, string value) { foreach (var key in keys) sut[key] = value; var keyValuePairs = sut.ToList(); Assert.Equal(keys.Length, keyValuePairs.Count); foreach (var kvp in keyValuePairs) { Assert.True(keys.Cast<IJaggedIndex<int>>().Contains(kvp.Key)); Assert.Equal(value, kvp.Value); } }