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()); }
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()); }
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()); }
public async Task AddEvent_ValidObject_Success(IEventCache cache) { await cache.Add(new CachedEvent("url", JObject.FromObject(new { AProperty = "AValue" }))); }
public async Task AddEvent_Null_Throws(IEventCache cache) { await cache.Add(null); }
public void AddEvent_Null_Throws(IEventCache cache) { Assert.ThrowsAsync <Keen.Core.KeenException>(() => cache.Add(null)); }
public async Task AddEvent_ValidObject_Success(IEventCache cache) { await cache.Add(new CachedEvent("url", JObject.FromObject( new { AProperty = "AValue" }))); }
public void AddEvent_Null_Throws(IEventCache cache) { Assert.ThrowsAsync<Keen.Core.KeenException>(() => cache.Add(null)); }