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>(); } }
public void UpdateFrom340_To_342() { var filePath = InitializeTestFile("UpdateFrom340_To_342.crz3"); using var ds = new CruiseDatastore(filePath); var updater = new Updater_V3(); updater.Update(ds); ds.Invoking(x => x.Execute("DELETE FROM Plot_Stratum;")).Should().NotThrow <FMSC.ORM.SQLException>(); }