public PushMany ( int version, IEnumerable | ||
version | int | |
events | IEnumerable | |
Résultat | void |
public void GetRangeTest([Values(0, 1)]int version, [Values(0, 1)]int count) { var aggregate = new EventAggregate(); var events = new[] { "a", "b", "c" }; using (var tran = aggregate.BeginTransaction()) { aggregate.PushMany(-1, events); tran.Commit(); } CollectionAssert.AreEqual(events.ToList().GetRange(version, count), aggregate.GetRange(version, count)); }
public void PushManyTest() { var aggregate = new EventAggregate(); var events = new[] {"a", "b", "c"}; using (var tran = aggregate.BeginTransaction()) { aggregate.PushMany(-1, events); tran.Commit(); } CollectionAssert.AreEqual(events, aggregate.GetRange(0, 3)); }