public void Setup() { var eventStore = new TestSnapshotEventStore(); var eventPublisher = new TestEventPublisher(); var snapshotStore = new NullSnapshotStore(); var snapshotStrategy = new DefaultSnapshotStrategy <ISingleSignOnToken>(); var aggregateFactory = new AggregateFactory(new TestDependencyResolver()); var repository = new SnapshotRepository <ISingleSignOnToken>(snapshotStore, snapshotStrategy, new Repository <ISingleSignOnToken>(aggregateFactory, eventStore, eventPublisher, new NullCorrelationIdHelper()), eventStore, aggregateFactory); var session = new UnitOfWork <ISingleSignOnToken>(repository); _aggregate = session.Get <TestSnapshotAggregate>(Guid.NewGuid()); }
public void Setup() { var eventStore = new TestSnapshotEventStore(); var eventPublisher = new TestEventPublisher(); var snapshotStore = new NullSnapshotStore(); var snapshotStrategy = new DefaultSnapshotStrategy <ISingleSignOnToken>(); _dependencyResolver = new TestDependencyResolver(null); var aggregateFactory = new AggregateFactory(_dependencyResolver, _dependencyResolver.Resolve <ILogger>()); var repository = new SnapshotRepository <ISingleSignOnToken>(snapshotStore, snapshotStrategy, new AggregateRepository <ISingleSignOnToken>(aggregateFactory, eventStore, eventPublisher, new NullCorrelationIdHelper(), new ConfigurationManager()), eventStore, aggregateFactory); var session = new UnitOfWork <ISingleSignOnToken>(repository); Guid id = Guid.NewGuid(); _dependencyResolver.NewAggregateGuid = id; _aggregate = session.Get <TestSnapshotAggregate>(id); }