public void Setup()
 {
     var eventStore = new TestEventStore();
     var eventPublisher = new TestEventPublisher();
     var snapshotStore = new NullSnapshotStore();
     var snapshotStrategy = new DefaultSnapshotStrategy();
     var repository = new SnapshotRepository(snapshotStore, snapshotStrategy, new Repository(eventStore, eventPublisher), eventStore);
     var session = new Session(repository);
     _aggregate = session.Get<TestSnapshotAggregate>(Guid.NewGuid());
 }
 public void Setup()
 {
     var eventStore = new TestEventStore();
     var eventPublisher = new TestEventPublisher();
     _snapshotStore = new TestSnapshotStore();
     var snapshotStrategy = new DefaultSnapshotStrategy();
     var repository = new SnapshotRepository(_snapshotStore, snapshotStrategy, new Repository(eventStore, eventPublisher), eventStore);
     var session = new Session(repository);
     var aggregate = new TestSnapshotAggregate();
     for (int i = 0; i < 30; i++)
     {
         aggregate.DoSomething();
     }
     session.Add(aggregate);
     session.Commit();
 }