public void SetUp() { _storeRecords = new List<StoreRecord>(); _serializer = new TestMessageSerializer(new[] { typeof(SerializerTest1), typeof(SerializerTest2), typeof(string) }); _path = Path.Combine(Path.GetTempPath(), "MessageStorePublisher", Guid.NewGuid().ToString()); _appendOnlyStore = new FileAppendOnlyStore(new DirectoryInfo(_path)); _appendOnlyStore.Initialize(); _store = new MessageStore(_appendOnlyStore, _serializer); var streamer = new EnvelopeStreamer(_serializer); var queueWriter = new TestQueueWriter(); _sender = new MessageSender(streamer, queueWriter); var store = new FileDocumentStore(Path.Combine(_path, "lokad-cqrs-test"), new DocumentStrategy()); _nuclearStorage = new NuclearStorage(store); _publisher = new MessageStorePublisher(_store, _sender, _nuclearStorage, DoWePublishThisRecord); }
public void SetUp() { _storeRecords = new List <StoreRecord>(); this._serializer = new TestMessageSerializer(new[] { typeof(SerializerTest1), typeof(SerializerTest2), typeof(string) }); this._path = Path.Combine(Path.GetTempPath(), "MessageStorePublisher", Guid.NewGuid().ToString()); this._appendOnlyStore = new FileAppendOnlyStore(new DirectoryInfo(this._path)); this._appendOnlyStore.Initialize(); this._store = new MessageStore(this._appendOnlyStore, this._serializer); var streamer = new EnvelopeStreamer(this._serializer); var queueWriter = new TestQueueWriter(); this._sender = new MessageSender(streamer, queueWriter); var store = new FileDocumentStore(Path.Combine(this._path, "lokad-cqrs-test"), new DocumentStrategy()); this._nuclearStorage = new NuclearStorage(store); this._publisher = new MessageStorePublisher("test-tape", this._store, this._sender, this._nuclearStorage, DoWePublishThisRecord); }
public void Setup() { var tmpPath = Path.GetTempPath(); Store = new FileDocumentStore(Path.Combine(tmpPath, "lokad-cqrs-test"), new DocumentStrategy()); }
public static NuclearStorage CreateNuclear(this FileStorageConfig config, IDocumentStrategy strategy) { var factory = new FileDocumentStore(config.FullPath, strategy); return(new NuclearStorage(factory)); }
public static NuclearStorage CreateNuclear(this FileStorageConfig config, IDocumentStrategy strategy) { var factory = new FileDocumentStore(config.FullPath, strategy); return new NuclearStorage(factory); }
public void Setup() { var tmpPath = Path.GetTempPath(); Store = new FileDocumentStore(Path.Combine(tmpPath, "lokad-cqrs-test"), new DocumentStrategy()); }
public void Setup() { m_strategy = new FileJsonDocumentStrategy(); m_store = new FileDocumentStore(FOLDER_PATH, m_strategy); m_account = new AccountView { AccountID = Guid.NewGuid(), Name = "Test Account" }; m_accountID = new AccountID(m_account.AccountID); m_store.ResetAll(); }