コード例 #1
0
        public async Task AddEvent_Iterate_Success(IEventCache cache)
        {
            await cache.ClearAsync();

            await cache.AddAsync(new CachedEvent("url", JObject.FromObject(new { Property = "Value" })));

            await cache.AddAsync(new CachedEvent("url", JObject.FromObject(new { Property = "Value" })));

            Assert.NotNull(await cache.TryTakeAsync());
            Assert.NotNull(await cache.TryTakeAsync());
            Assert.Null(await cache.TryTakeAsync());
        }
コード例 #2
0
 public async Task AddEvent_ValidObject_Success(IEventCache cache)
 {
     await cache.AddAsync(new CachedEvent("url", JObject.FromObject(new { Property = "Value" })));
 }
コード例 #3
0
 public void AddEvent_Null_Throws(IEventCache cache)
 {
     Assert.ThrowsAsync <KeenException>(() => cache.AddAsync(null));
 }