public void RemoveEmptyMapEntry() { Replacer replacer = new Replacer(); replacer.Add("a", "b"); Assert.That( () => replacer.Remove(string.Empty), Throws.ArgumentNullException); Assert.That( () => replacer.Remove(null), Throws.ArgumentNullException); }
public void RemoveFakeMapEntry() { Replacer replacer = new Replacer(); replacer.Add("a", "b"); Assert.That( () => replacer.Remove("c"), Throws.InstanceOf <KeyNotFoundException>()); Assert.That( () => replacer.Remove("b"), Throws.InstanceOf <KeyNotFoundException>()); }
public void RemoveMapEntryEmpty() { Replacer replacer = new Replacer(); Assert.That( () => replacer.Remove("a"), Throws.InstanceOf <KeyNotFoundException>()); }
public void RemoveMapEntry() { Replacer replacer = new Replacer(); replacer.Add("a", "b"); Assert.That(replacer.Map.Count, Is.EqualTo(1)); replacer.Remove("a"); Assert.That(replacer.Map.Count, Is.EqualTo(0)); }