public void ReCreateTest() { var server = Utility.LoadServers("TestData/servers.yml")["mssql"]; var db = Utility.LoadDataBase("TestData/mssql.yml"); var sql = new MsSql(server, false); sql.Connect(); var result = sql.ReCreate(db, false); _output.WriteLine(result.Query); Assert.True(result.Success); }
public void DiffTest() { var server = Utility.LoadServers("TestData/servers.yml")["mssql"]; var db = Utility.LoadDataBase("TestData/mssql.yml"); var sql = new MsSql(server, false); var res = sql.Connect(); sql.ReCreate(db, false); Utility.TrimDataBaseProperties(db); var diff = sql.Diff(db); Assert.False(diff.HasDiff); }
public void ExtractTest() { var server = Utility.LoadServers("TestData/servers.yml")["mssql"]; var db = Utility.LoadDataBase("TestData/mssql.yml"); var sql = new MsSql(server, false); var res = sql.Connect(); sql.ReCreate(db, false); Utility.TrimDataBaseProperties(db); var extract = sql.Extract(); var yaml = Utility.DataBaseToYaml(extract); _output.WriteLine(yaml); Assert.NotEmpty(extract.Tables); }