public void TestRemove() { var dictionary = new PinkoDictionary<string, string>(); Assert.IsFalse(dictionary.Update("k1", () => "value1")); Assert.IsNotNull(dictionary.Remove("k1")); Assert.IsNull(dictionary.Remove("k1")); Assert.IsNull(dictionary.Remove("k2")); }
public void TestUpdate() { var dictionary = new PinkoDictionary<string, string>(); Assert.IsFalse(dictionary.Update("k1", () => "value1")); Assert.IsTrue(dictionary.Update("k1", () => "value2")); Assert.IsFalse(dictionary.Update("k2", () => "value1")); }