public void FetchStaffTest() { DBManager_Accessor target = new DBManager_Accessor(); // TODO: Initialize to an appropriate value DataTable expected = null; // TODO: Initialize to an appropriate value DataTable actual; actual = target.FetchStaff(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void AddStaffTest() { DBManager_Accessor target = new DBManager_Accessor(); // TODO: Initialize to an appropriate value string staffID = "*****@*****.**"; // TODO: Initialize to an appropriate value string staffName = "just for test"; DateTime renewPasswordDate = DateTime.Now; // TODO: Initialize to an appropriate value DateTime dateOfBirth = DateTime.Now; // TODO: Initialize to an appropriate value DateTime joinDate = DateTime.Now; // TODO: Initialize to an appropriate value string gender = "Male"; // TODO: Initialize to an appropriate value string religion = "Free thinker";// TODO: Initialize to an appropriate value string position = "just for test"; // TODO: Initialize to an appropriate value string contact = "88888888"; // TODO: Initialize to an appropriate value bool isDefaultPassword = true; // TODO: Initialize to an appropriate value //target.AddStaff(staffID, staffName, renewPasswordDate, dateOfBirth, joinDate, gender, religion, position, contact, isDefaultPassword); DataTable dtExpected = new DataTable(); DataTable dtResult; dtExpected.Columns.Add("StaffID", typeof(string)); dtExpected.Columns.Add("StaffName", typeof(string)); dtExpected.Columns.Add("RenewPasswordDate", typeof(DateTime)); dtExpected.Columns.Add("DateOfBirth", typeof(DateTime)); dtExpected.Columns.Add("JoinDate", typeof(DateTime)); dtExpected.Columns.Add("Gender", typeof(string)); dtExpected.Columns.Add("Religion", typeof(string)); dtExpected.Columns.Add("Position", typeof(string)); dtExpected.Columns.Add("Contact", typeof(int)); dtExpected.Columns.Add("DefaultPassword", typeof(bool)); dtExpected.Rows.Add(staffID, staffName, renewPasswordDate, dateOfBirth, joinDate, gender, religion, position, contact, isDefaultPassword); dtResult = target.FetchStaff(); //Comparison }