Ejemplo n.º 1
0
        //[Test]
        public void ScriptData()
        {
            IList <DbObjectName> tables = engine.GetAllTables(connSettings1);

            ScriptingOptions options = new ScriptingOptions();

            options.ExportDirectory = exportDir;
            options.ScriptData      = true;
            options.AddTablesToScript(tables);

            engine.Script(connSettings1, options);
        }
Ejemplo n.º 2
0
        public void ShouldScriptAllTables()
        {
            IList <DbObjectName> tables = engine.GetAllTables(connectionSettings);

            scriptingOptions.AddTablesToScript(tables);
            engine.Script(connectionSettings, scriptingOptions);
        }
Ejemplo n.º 3
0
        public void ShouldScriptAllTables()
        {
            IList <DbObjectName> tables = engine.GetAllTables(connSettings);

            ScriptingOptions options = new ScriptingOptions();

            options.ExportDirectory = exportDir;
            options.ScriptSchema    = true;
            options.AddTablesToScript(tables);

            engine.Script(connSettings, options);

            string dataPath = Path.Combine(exportDir, "Schema\\Tables");

            Assert.IsTrue(File.Exists(Path.Combine(dataPath, "dbo.Customer.sql")), "customer script missing");
            Assert.IsTrue(File.Exists(Path.Combine(dataPath, "dbo.Country.sql")), "country script missing");
            Assert.IsTrue(File.Exists(Path.Combine(dataPath, "dbo.Address.sql")), "address script missing");
            Assert.IsTrue(File.Exists(Path.Combine(dataPath, "dbo.SoftwareVersion.sql")), "software script missing");
        }
Ejemplo n.º 4
0
        public void ShouldGetAllTables()
        {
            IList <DbObjectName> tables = engine.GetAllTables(connectionSettings);

            Assert.That(tables.Count == 66);
        }