Exemple #1
0
        public void ShouldScriptAllSprocs()
        {
            IList <DbObjectName> sprocs = engine.GetAllSprocs(connSettings);

            ScriptingOptions options = new ScriptingOptions();

            options.ExportDirectory = exportDir;
            options.AddSprocsToScript(sprocs);

            engine.Script(connSettings, options);

            string dataPath = Path.Combine(exportDir, "Sprocs");

            Assert.IsTrue(File.Exists(Path.Combine(dataPath, "dbo.GetCustomers.sql")), "GetCustomers script missing");
            Assert.IsTrue(File.Exists(Path.Combine(dataPath, "dbo.GetCustomerAddress.sql")), "GetCustomerAddress script missing");
        }
Exemple #2
0
        public void ShouldGetAllSprocs()
        {
            IList <DbObjectName> sprocs = engine.GetAllSprocs(connectionSettings);

            Assert.That(sprocs.Count == 0);
        }