public void Remove_Item() { var pvs = new PersistentVariablesSource(); var kvp = new KeyValuePair <string, VariablesGroup>("theKey", new VariablesGroup()); pvs.Add(kvp); pvs.Remove(kvp); Assert.That(pvs.Count, Is.EqualTo(0)); Assert.That(pvs.Remove("non-existent"), Is.EqualTo(false)); }
public void Remove_Key_Value_Pair() { var pvs = new PersistentVariablesSource { { "global", new VariablesGroup() } }; pvs.Remove("global"); Assert.That(pvs.Count, Is.EqualTo(0)); Assert.That(pvs.Remove("non-existent"), Is.EqualTo(false)); }