public async Task add_get()
        {
            var msg = Setup.Fixture.CreateMany<MyEvent>().ToList();
            var myEvent = new MyEvent() {TimeStamp = DateTimeOffset.Now.AddDays(-100)};
            msg.Add(myEvent);

            await _sut.Add("bla", msg);
            var all=_sut.GetMessages("bla", 20);
            all.ShouldAllBeEquivalentTo(msg);
            all.Should().BeInAscendingOrder(d => d.TimeStamp);
            all.Cast<MyEvent>().Any(d => d.Some == "Lala").Should().BeTrue();
        }
 public void Handle(MyEvent ev)
 {
     
 }
 public void Handle(MyEvent ev)
 {
 }
示例#4
0
 public void Handle(MyEvent ev)
 {
     _results.Add(ev.GetType());
 }