public void TestManageCreateDatabase() { string query = @"CREATE DATABASE myDB;"; ClassParsing myClass = new ClassParsing(); string name = "myDB"; ClassCreateDatabase myCreatedDB = new ClassCreateDatabase(name); string a = myClass.ManageCreateDatabase(query).getName(); Assert.AreEqual(myClass.ManageCreateDatabase(query).getName(), myCreatedDB.getName()); }
public ClassCreateDatabase ManageCreateDatabase(string pQuery) { string name = ""; Match matchcreatedatabase2 = Regex.Match(pQuery, Constants.regExpCreateDatabase); if (matchcreatedatabase2.Success) { name = matchcreatedatabase2.Groups[1].Value; } ClassCreateDatabase query = new ClassCreateDatabase(name); return(query); }