public void Initialize() { this.logger = new Mock <ILogger>(); this.domainFactory = new Mock <IDomainFactory>(); this.migrator = new Mock <IChangeEventMigrator>(); this.repository = new Mock <IRepository>(); this.storage = new GeneralEventStreamStorage <TestAggregateRoot>(this.logger.Object, this.domainFactory.Object, this.migrator.Object, this.repository.Object); this.stateChangedEvent = null; this.storage.OnEventStreamStateChanged += (sender, args) => { this.stateChangedEvent = args; }; }
public GeneralEventStreamStorageSpec() { var recorder = new Mock <IRecorder>(); this.domainFactory = new Mock <IDomainFactory>(); var migrator = new Mock <IChangeEventMigrator>(); this.repository = new Mock <IRepository>(); this.storage = new GeneralEventStreamStorage <TestAggregateRoot>(recorder.Object, this.domainFactory.Object, migrator.Object, this.repository.Object); this.stateChangedEvent = null; this.storage.OnEventStreamStateChanged += (sender, args) => { this.stateChangedEvent = args; }; }