public void Remove_OneKeyOneValue_Removed() { var trie = new PatriciaTrie <int>(); trie.Add("foo", 42); trie.Remove("foo", v => true); Assert.Equal(0, Enumerable.Count <int>(trie.Get("foo"))); }
public void Remove_OneKeyTwoValuesRemoveOne_ExpectedValueLost() { var trie = new PatriciaTrie <int>(); trie.Add("foo", 42); trie.Add("foo", 43); trie.Remove("foo", v => v == 42); Assert.Equal(43, Enumerable.First <int>(trie.Get("foo"))); }