Exemplo n.º 1
0
            public void GetViewsTest_null()
            {
                CUBRIDConnection connection = new CUBRIDConnection(); // TODO: Initialize to an appropriate value

                connection.ConnectionString = DBHelper.connString;
                connection.Open();
                CUBRIDSchemaProvider target = new CUBRIDSchemaProvider(connection); // TODO: Initialize to an appropriate value

                string[]  filters = null;                                           // TODO: Initialize to an appropriate value
                DataTable actual;

                actual = target.GetViews(filters);
                Assert.AreEqual(0, actual.Rows.Count);
            }
Exemplo n.º 2
0
        /// <summary>
        /// Test CUBRIDSchemaProvider GetViews() method
        /// </summary>
        private static void Test_GetViews()
        {
            using (CUBRIDConnection conn = new CUBRIDConnection())
            {
                conn.ConnectionString = TestCases.connString;
                conn.Open();

                CUBRIDSchemaProvider schema = new CUBRIDSchemaProvider(conn);
                DataTable            dt     = schema.GetViews(null);

                Debug.Assert(dt.Columns.Count == 3);
                Debug.Assert(dt.Rows.Count == 0);
            }
        }
Exemplo n.º 3
0
            public void GetViewsTest()
            {
                CUBRIDConnection connection = new CUBRIDConnection(); // TODO: Initialize to an appropriate value

                connection.ConnectionString = DBHelper.connString;
                connection.Open();
                DBHelper.ExecuteSQL("drop view if exists test_view", connection);
                DBHelper.ExecuteSQL("create view test_view as select * from code;", connection);
                CUBRIDSchemaProvider target = new CUBRIDSchemaProvider(connection); // TODO: Initialize to an appropriate value

                string[]  filters = null;                                           // TODO: Initialize to an appropriate value
                DataTable actual;

                actual = target.GetViews(filters);
                Assert.AreEqual(1, actual.Rows.Count);
            }