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()); }
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); } }