public void prop_Count_get() { var obj = new WebCacheCollection(); try { Assert.Equal(0, obj.Count); obj.Add(AlphaDecimal.Random(), new object()); Assert.Equal(1, obj.Count); } finally { obj.Clear(); } }
public void op_Add_string_object_TimeSpan() { var obj = new WebCacheCollection(); try { var key = AlphaDecimal.Random(); var expected = new object(); obj.Add(key, expected, new TimeSpan(12345)); var actual = obj[key]; Assert.Same(expected, actual); } finally { obj.Clear(); } }
public void op_Add_string_object_DateTime() { var obj = new WebCacheCollection(); try { var key = AlphaDecimal.Random(); var expected = new object(); obj.Add(key, expected, DateTime.UtcNow.AddDays(1)); var actual = obj[key]; Assert.Same(expected, actual); } finally { obj.Clear(); } }