public void Setup()
 {
     var eventStore = new TestEventStore();
     var testEventPublisher = new TestEventPublisher();
     var snapshotStore = new NullSnapshotStore();
     _rep = new Repository<TestAggregate>(eventStore, snapshotStore, testEventPublisher);
 }
 public void Setup()
 {
     var eventStore = new TestEventStore();
     var eventPublisher = new TestEventPublisher();
     var snapshotStrategy = new DefaultSnapshotStrategy();
     _rep = new Repository<TestAggregateNoParameterLessConstructor>(eventStore, null, eventPublisher, snapshotStrategy);
 }
 public void Setup()
 {
     var eventStore = new TestEventStore();
     var eventPublisher = new TestEventPublisher();
     var snapshotStore = new NullSnapshotStore();
     var rep = new Repository<TestSnapshotAggreagate>(eventStore, snapshotStore, eventPublisher);
     _aggregate = rep.Get(Guid.NewGuid());
 }
Exemple #4
0
 public void Setup()
 {
     _eventStore = new TestEventStore();
     _eventPublisher = new TestEventPublisher();
     var snapshotstore = new NullSnapshotStore();
     _rep = new Repository<TestAggregateNoParameterLessConstructor>(_eventStore, snapshotstore, _eventPublisher);
     _aggregate = new TestAggregateNoParameterLessConstructor(2);
 }
 public void Setup()
 {
     var eventStore = new TestEventStore();
     var eventPublisher = new TestEventPublisher();
     _snapshotStore = new TestSnapshotStore();
     var snapshotStrategy = new DefaultSnapshotStrategy();
     var rep = new Repository<TestSnapshotAggregate>(eventStore, _snapshotStore, eventPublisher, snapshotStrategy);
     _aggregate = rep.Get(Guid.NewGuid());
 }
 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 rep = new Repository<TestSnapshotAggregate>(eventStore, _snapshotStore, eventPublisher, snapshotStrategy);
     var aggregate = new TestSnapshotAggregate();
     for (int i = 0; i < 30; i++)
     {
         aggregate.DoSomething();
     }
     rep.Save(aggregate, 0);
 }
 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();
 }
 public void Setup()
 {
     var eventStore = new TestEventStore();
     var eventPublisher = new TestEventPublisher();
     _session = new Session(new Repository(eventStore, eventPublisher));
 }
 public void Setup()
 {
     var eventStore = new TestEventStore();
     var eventPublisher = new TestEventPublisher();
     _rep = new Repository<TestAggregateNoParameterLessConstructor>(eventStore, null, eventPublisher);
 }