Example #1
0
        private static void GenerateSqlBaseline(string metaFile, string targetDir, string databaseName)
        {
            Logger.Instance.Info("Generating sql baseline file...");
            var metaInfo  = MetaInfo.FromXmlFile(metaFile);
            var generator = new MySqlBaselineGenerator(metaInfo, databaseName);
            var fileName  = Path.Combine(targetDir, DefaultSqlFileName);

            generator.Generate(fileName);
            Logger.Instance.Info("Done into {0}", fileName);
        }
Example #2
0
        public void ShouldGenerateSqlBaseline()
        {
            var metaInfo   = MetaInfo.FromXmlFile(@"TestData\meta-info.xml");
            var actualFile = Path.Combine(TestContext.TestResultsDirectory, "baseline.sql");

            var generator = new MySqlBaselineGenerator(metaInfo, "world");

            generator.Generate(actualFile);

            CompareFiles(@"TestData\Out\baseline.sql", actualFile);
        }