private async Task<IEnumerable<IAggregateEvent>> MakeExpectedChanges(CounterStats expected) { var counter = new Sample.Counter(AggregateId, new Sample.CounterState()); for (var i = 0; i < expected.NumberOfIncrements; ++i) { counter.Increment(); } for (var i = 0; i < expected.NumberOfMultiplications; ++i) { counter.Multiply(1); } for (var i = 0; i < expected.NumberOfResets; ++i) { counter.Reset(); } await this.eventStore.Append(AggregateId, 0, counter.Changes); return counter.Changes; }
private async Task <IEnumerable <IAggregateEvent> > MakeExpectedChanges(CounterStats expected) { var counter = new Sample.Counter(AggregateId, new Sample.CounterState()); for (var i = 0; i < expected.NumberOfIncrements; ++i) { counter.Increment(); } for (var i = 0; i < expected.NumberOfMultiplications; ++i) { counter.Multiply(1); } for (var i = 0; i < expected.NumberOfResets; ++i) { counter.Reset(); } await this.eventStore.Append(AggregateId, 0, counter.Changes); return(counter.Changes); }