Example #1
0
 public void OpenSession_should_throw_exception_if_datadirectory_is_not_specified()
 {
     var store = new DocumentStore { DatabaseName = TestSetup.DatabaseName };
     store.Invoking(x => x.OpenSession()).ShouldThrow<ArgumentException>();
 }
Example #2
0
 public void Initialize_should_throw_exception_when_datadirectory_does_not_exist()
 {
     const string invalidPath = @"c:\invalid_path";
     var store = new DocumentStore { DataLocation = invalidPath, DatabaseName = TestSetup.DatabaseName };
     store.Invoking(x => x.OpenSession()).ShouldThrow<DirectoryNotFoundException>();
 }