public void AttachDB_DetachDB_inmemory() { using (var maindb = new CruiseDatastore()) using (var db2 = new CruiseDatastore()) { maindb.AttachDB(db2, "db2"); maindb.Invoking(x => x.Execute("SELECT count(*) FROM db2.sqlite_master")) .Should().NotThrow(); maindb.DetachDB("db2"); maindb.Invoking(x => x.Execute("SELECT count(*) FROM db2.sqlite_master")) .Should().Throw <SQLException>(); } }