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