public void op_Remove_string() { var obj = new WebCacheCollection(); try { var key = AlphaDecimal.Random(); var expected = new object(); obj[key] = expected; var actual = obj.Remove(key); Assert.False(obj.ContainsKey(key)); Assert.Same(expected, actual); } finally { obj.Clear(); } }
public void op_RemoveOfT_string() { var obj = new WebCacheCollection(); try { var key = AlphaDecimal.Random(); const int expected = 123; obj[key] = expected; var actual = obj.Remove <int>(key); Assert.False(obj.ContainsKey(key)); Assert.Equal(expected, actual); } finally { obj.Clear(); } }