public void TestCache() { var cache = new InstanceCache(); cache.Clear(); var summary = new HtmlSummary(HttpStatusCode.OK, "http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4", RawHtml, "text/html"); cache.Set("first", summary); cache.Set("second", summary); var first = cache.Get<HtmlSummary>("first"); var second = cache.Get<HtmlSummary>("second"); first.Should().NotBeNull(); second.Should().NotBeNull(); first.CreatedAt.Should().Be(second.CreatedAt); cache.Unset("first"); var none = cache.Get<HtmlSummary>("first"); none.Should().BeNull(); }