示例#1
0
 public void Should_set_date()
 {
     var agg = new TestAggregateNoParameterLessConstructor(1, Guid.Empty);
     agg.DoSomething();
     _rep.Save(agg,0);
     Assert.That(_eventStore.SavedEvents.First().Timestamp, Is.InRange(DateTimeOffset.UtcNow.AddSeconds(-1), DateTimeOffset.UtcNow.AddSeconds(1)));
 }
示例#2
0
 public void Should_add_new_aggregate()
 {
     var agg = new TestAggregateNoParameterLessConstructor(1,Guid.Empty);
     agg.DoSomething();
     _rep.Save(agg,0);
     Assert.AreEqual(1, _eventStore.SavedEvents.Count);
 }