// DON'T put in a transaction because the error messes up the transaction's state // and then we can't read the table list // - the good news is nothing permanent happens anyway :-) public void MigrationUpwithErrors() { DataService.ClearSchemaCache("Northwind"); //test that the two correct tables don't get added to the database Migration m = new MigrationTest002(); try { m.Migrate("Northwind", Migration.MigrationDirection.Up); } catch { //gobble errror } Assert.IsFalse(DataService.TableExists("Northwind", "Distribution")); Assert.IsFalse(DataService.TableExists("Northwind", "ShipStatus")); }
public void MigrationUpwithErrors() { //test that the two correct tables don't get added to the database Migration m = new MigrationTest002(); try { m.Migrate("Northwind", Migration.MigrationDirection.Up); } catch { //gobble errror } Assert.IsFalse(DataService.TableExists("Northwind", "Distribution")); Assert.IsFalse(DataService.TableExists("Northwind", "ShipStatus")); }