public void AddNormalTest() { EmployeeContainer ec = new EmployeeContainer("test", "AddNormalTestLog"); ParttimeEmployee pe = new ParttimeEmployee( new DateTime(1999, 12, 31), new DateTime(2000, 1, 1), 10, "Testy", "Peoper", new DateTime(1950, 1, 1), "111222333" ); Assert.AreEqual(ec.Add(pe), true); }
public void AddExceptionTest() { EmployeeContainer ec = new EmployeeContainer("test", "AddExceptionTestLog"); ParttimeEmployee pe = new ParttimeEmployee( new DateTime(1999, 12, 31), new DateTime(2000, 1, 1), 10, "Testy", "Peoper", new DateTime(1900, 1, 1), //invalid date of birth "111222333" ); Assert.AreEqual(ec.Add(pe), false); }
public void DetailsAtExceptionTest() { EmployeeContainer ec = new EmployeeContainer("test", "DetailsAtExceptionTestLog"); ec.DetailsAt(-1); }
public void ModifyNormalTest() { EmployeeContainer ec = new EmployeeContainer("test", "ModifyNormalTestLog"); ParttimeEmployee pe = new ParttimeEmployee( new DateTime(1999, 12, 31), new DateTime(2000, 1, 1), 10, "Testy", "Peoper", new DateTime(1950, 1, 1), "111222333" ); ec.Add(pe); FulltimeEmployee fe = new FulltimeEmployee( new DateTime(2004, 3, 6), new DateTime(2010, 1, 17), 1000, "Dirty", "Dan", new DateTime(1975, 5, 30), "333222111" ); Assert.AreEqual(ec.Modify(0, fe), true); }
public void GetCopyAtNormalTest() { EmployeeContainer ec = new EmployeeContainer("test", "GetCopyAtNormalTestLog"); ParttimeEmployee pe = new ParttimeEmployee( new DateTime(1999, 12, 31), new DateTime(2000, 1, 1), 10, "Testy", "Peoper", new DateTime(1950, 1, 1), "111222333" ); ec.Add(pe); Employee peCopy = ec.GetCopyAt(0); Assert.AreEqual(peCopy.Details(), pe.Details()); }
public void GetCopyAtExceptionTest() { EmployeeContainer ec = new EmployeeContainer("test", "GetCopyAtExceptionTesLog"); ec.GetCopyAt(-1); }
/** * @fn public UIMenu(string dbFilePath) * * @brief Constructor. * * @param dbFilePath Full pathname of the database file. */ public UIMenu(string dbFilePath) { employees = new EmployeeContainer(dbFilePath, "EMSLogger"); }