public void AsyncJournalingYieldsAsyncWriter()
 {
     var config = new EngineConfiguration(Guid.NewGuid().ToString());
     config.AsyncronousJournaling = true;
     config.SetStoreFactory(c => new InMemoryStore(c));
     var store = config.CreateStore();
     var writer = store.CreateJournalWriter(1);
     Assert.IsTrue(writer is AsynchronousJournalWriter);
 }
 public void InjectedStorageIsResolved()
 {
     var config = new EngineConfiguration()
         .WithRandomLocation();
     var expected = new FileStore(config);
     config.SetStoreFactory((c) => expected);
     var actual = config.CreateStore();
     Assert.AreSame(expected, actual);
     Directory.Delete(config.Location.OfJournal, true);
 }
 public void InjectingStorageSetsModeToCustom()
 {
     var config = new EngineConfiguration();
     config.SetStoreFactory((c) => null);
     Assert.AreEqual(Stores.Custom, config.StoreType);
 }