예제 #1
0
        public void ValidateDatabaseExistsWorks()
        {
            var catalog = "NoneExistsCatalog";
            var smo     = new SmoOperations();
            var results = smo.DatabaseExists(catalog);

            Assert.IsFalse(smo.DatabaseExists(catalog));
        }
예제 #2
0
        public void DefaultCatalogExists()
        {
            var ops = new SqlOperations(TestCatalog);

            SqlConnectionStringBuilder builder =
                new SqlConnectionStringBuilder(ops.ConnectionString);

            var catalog = builder.InitialCatalog;
            var smo     = new SmoOperations();
            var results = smo.DatabaseExists(catalog);

            Assert.IsTrue(smo.DatabaseExists(catalog));
        }