本文整理汇总了C#中Roadkill.Tests.Unit.StubsAndMocks.CacheMock.Select方法的典型用法代码示例。如果您正苦于以下问题:C# CacheMock.Select方法的具体用法?C# CacheMock.Select怎么用?C# CacheMock.Select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Roadkill.Tests.Unit.StubsAndMocks.CacheMock
的用法示例。
在下文中一共展示了CacheMock.Select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: addloggedinmenu_should_cache_html
public void addloggedinmenu_should_cache_html()
{
// Arrange
CacheMock cache = new CacheMock();
SiteCache siteCache = new SiteCache(cache);
// Act
siteCache.AddLoggedInMenu("some html");
// Assert
Assert.That(cache.Count(), Is.EqualTo(1));
IEnumerable<string> keys = cache.Select(x => x.Key);
Assert.That(keys, Contains.Item(CacheKeys.LoggedInMenuKey()));
}
示例2: AddMenu_Should_Cache_Html
public void AddMenu_Should_Cache_Html()
{
// Arrange
CacheMock cache = new CacheMock();
ApplicationSettings settings = new ApplicationSettings();
SiteCache siteCache = new SiteCache(settings, cache);
// Act
siteCache.AddMenu("some html");
// Assert
Assert.That(cache.Count(), Is.EqualTo(1));
IEnumerable<string> keys = cache.Select(x => x.Key);
Assert.That(keys, Contains.Item(CacheKeys.MenuKey()));
}