예제 #1
0
        public void TablesExists()
        {
            var ops = new SqlOperations(TestCatalog);

            SqlConnectionStringBuilder builder =
                new SqlConnectionStringBuilder(ops.ConnectionString);

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

            Assert.IsTrue(smo.TableExists(catalog, "People"),
                          "Expected to find People table");

            Assert.IsTrue(smo.TableExists(catalog, "Gender"),
                          "Expected to find Gender table");

            Assert.IsFalse(smo.TableExists(catalog, "Products"),
                           "Expected not to find Products table");
        }