Ejemplo n.º 1
0
        public void ShouldScriptAllViews()
        {
            IList <DbObjectName> views = engine.GetAllViews(connSettings);

            ScriptingOptions options = new ScriptingOptions();

            options.ExportDirectory = exportDir;
            options.AddViewsToScript(views);

            engine.Script(connSettings, options);

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

            Assert.IsTrue(File.Exists(Path.Combine(dataPath, "dbo.CustomerAndPrimaryAddress.sql")), "CustomerAndPrimaryAddress script missing");
        }
Ejemplo n.º 2
0
        public void ShouldGetAllViews()
        {
            IList <DbObjectName> views = engine.GetAllViews(connectionSettings);

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