public DataSet AdminGetTableData(string selectedTable) { ctrAdminObj = new CtrAdmin(); Console.WriteLine(); Console.WriteLine("AdminGetTableData() " + GetExecutionThreadTime()); Console.WriteLine("Table: " + selectedTable); return ctrAdminObj.GetTableData(selectedTable); }
public void AdminUpdateFlats() { CtrAdmin ctrAdminObj = new CtrAdmin(); DataSet ds = ctrAdminObj.GetTableData("Flats"); ds.Tables[0].Rows[0]["Description"] = "This is changed descrition..."; bool actual = ctrAdminObj.UpdateFlats(ds); bool expected = true; Assert.AreEqual(expected, actual); }
public void AdminAddApplication() { CtrAdmin ctrAdminObj = new CtrAdmin(); DataSet ds = ctrAdminObj.GetTableData("Applications"); DataRow dr = ds.Tables[0].NewRow(); dr["StudentEmail"] = "*****@*****.**"; dr["FlatId"] = 75; ds.Tables[0].Rows.Add(dr); ctrAdminObj.UpdateApplications(ds); }
public void AdminUpdateLandlords() { CtrAdmin ctrAdminObj = new CtrAdmin(); DataSet ds = ctrAdminObj.GetTableData("Landlords"); DataRow dr = ds.Tables[0].NewRow(); dr = AddLandlordRow(dr); ds.Tables[0].Rows.Add(dr); bool actual = ctrAdminObj.UpdateLandlords(ds); bool expected = true; Assert.AreEqual(expected, actual); }
private DataSet GetAdminDataSet(string username, string password) { CtrAdmin ctrAdminObj = new CtrAdmin(); DataSet ds = ctrAdminObj.GetTableData("Admins"); DataRow dr = ds.Tables[0].NewRow(); dr["Username"] = username; dr["Password"] = password; dr["Salt"] = "None"; ds.Tables[0].Rows.Add(dr); return ds; }