예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 public void InjectingStorageSetsModeToCustom()
 {
     var config = new EngineConfiguration();
     config.SetStoreFactory((c) => null);
     Assert.AreEqual(Stores.Custom, config.StoreType);
 }