Exemplo n.º 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());
        }
Exemplo n.º 2
0
 public async Task AddEvent_ValidObject_Success(IEventCache cache)
 {
     await cache.AddAsync(new CachedEvent("url", JObject.FromObject(new { Property = "Value" })));
 }
Exemplo n.º 3
0
 public void AddEvent_Null_Throws(IEventCache cache)
 {
     Assert.ThrowsAsync <KeenException>(() => cache.AddAsync(null));
 }