public void Emit_ValidLogEvents_SendsEventToServer() { var db = GetDb(); var ev = CreateLogItem(); var sut = new RedisListLPushSink(Client(), TimeSpan.FromMilliseconds(1)); sut.Emit(ev); WaitForBatchToComplete(); var value = db.ListRightPop(key); Assert.True(value.HasValue); }
public void Emit_ValidLogEvents_ContainsEvent() { var db = GetDb(); var ev = CreateLogItem(); var sut = new RedisListLPushSink(Client(), TimeSpan.FromMilliseconds(1)); sut.Emit(ev); WaitForBatchToComplete(); var length = db.ListLength(key); var list = db.ListRange(key, 0, length); Assert.True(list.Length == 1); }
public void Emit_100ValidEvents_ContainsEvent() { var db = GetDb(); var sut = new RedisListLPushSink(Client(), TimeSpan.FromMilliseconds(1)); Enumerable.Range(0, 100).ToList().ForEach(i => { var ev = CreateLogItem(); sut.Emit(ev); }); WaitForBatchToComplete(100); var length = db.ListLength(key); var list = db.ListRange(key, 0, length); Assert.True(list.Length == 100); }