public void RemoveAndGet() { var rd = new RouletteDictionary <string, string>(100); rd["foo"] = "bar"; var removedKVP = rd.RemoveRandomAndGet(); Assert.Equal("foo", removedKVP.Key); Assert.Equal("bar", removedKVP.Value); Assert.Empty(rd); }
public void RemoveAndGet() { var rd = new RouletteDictionary <string, string>(100); rd["foo"] = "bar"; var removedKVP = rd.RemoveRandomAndGet(); Assert.Equal("foo", removedKVP.Key); Assert.Equal("bar", removedKVP.Value); Assert.Empty(rd); }