示例#1
0
        public void TestManageDropTable()
        {
            string         query      = @"DROP TABLE table1;";
            ClassDropTable dt         = myClass.ManageDropTable(query);
            String         name       = "table1";
            ClassDropTable dtExpected = new ClassDropTable(name);

            Assert.AreEqual(dtExpected.GetName(), dt.GetName());
        }
示例#2
0
        public ClassDropTable ManageDropTable(String pQuery)
        {
            Match matchDropTable = Regex.Match(pQuery, Constants.regExpDropTable);

            if (matchDropTable.Success)
            {
                string         name  = matchDropTable.Groups[1].Value;
                ClassDropTable query = new ClassDropTable(name);
                return(query);
            }
            else
            {
                return(null);
            }
        }