Exemplo n.º 1
0
 public async Task AddEvent_Iterate_Success(IEventCache cache)
 {
     await cache.Clear();
     await cache.Add( new CachedEvent("url", JObject.FromObject( new { AProperty = "AValue" })));
     await cache.Add( new CachedEvent("url", JObject.FromObject( new { AProperty = "AValue" })));
     Assert.NotNull(await cache.TryTake());
     Assert.NotNull(await cache.TryTake());
     Assert.Null(await cache.TryTake());
 }
Exemplo n.º 2
0
        public async void AddEvent_Iterate_Success(IEventCache cache)
        {
            await cache.Clear();

            await cache.Add(new CachedEvent("url", JObject.FromObject(new { AProperty = "AValue" })));

            await cache.Add(new CachedEvent("url", JObject.FromObject(new { AProperty = "AValue" })));

            Assert.NotNull(await cache.TryTake());
            Assert.NotNull(await cache.TryTake());
            Assert.Null(await cache.TryTake());
        }
Exemplo n.º 3
0
        public async Task AddEvent_AddClearEmpty_Success(IEventCache cache)
        {
            await cache.Add(new CachedEvent("url", JObject.FromObject(new { AProperty = "AValue" })));

            await cache.Clear();

            Assert.Null(await cache.TryTake());
        }
Exemplo n.º 4
0
 public async Task AddEvent_ValidObject_Success(IEventCache cache)
 {
     await cache.Add(new CachedEvent("url", JObject.FromObject(new { AProperty = "AValue" })));
 }
Exemplo n.º 5
0
 public async Task AddEvent_Null_Throws(IEventCache cache)
 {
     await cache.Add(null);
 }
Exemplo n.º 6
0
 public void AddEvent_Null_Throws(IEventCache cache)
 {
     Assert.ThrowsAsync <Keen.Core.KeenException>(() => cache.Add(null));
 }
Exemplo n.º 7
0
 public async Task AddEvent_ValidObject_Success(IEventCache cache)
 {
     await cache.Add(new CachedEvent("url", JObject.FromObject( new { AProperty = "AValue" })));
 }
Exemplo n.º 8
0
 public void AddEvent_Null_Throws(IEventCache cache)
 {
     Assert.ThrowsAsync<Keen.Core.KeenException>(() => cache.Add(null));
 }
Exemplo n.º 9
0
 public async Task AddEvent_Null_Throws(IEventCache cache)
 {
     await cache.Add(null);
 }