public void SetDateOfBirthStringTestValidString() { FulltimeEmployee employee = new FulltimeEmployee(); bool retVal = employee.SetDateOfBirth("1993-04-24"); Assert.IsTrue(retVal); DateTime date = new DateTime(1993, 04, 24); int compReturn = DateTime.Compare(employee.GetDateOfBirth(), date); Assert.AreEqual(0, compReturn); }
public void SetDateOfBirthStringTestInvalidFuture() { FulltimeEmployee employee = new FulltimeEmployee(); bool retVal = employee.SetDateOfBirth("2017-11-24"); Assert.IsFalse(retVal); DateTime date = new DateTime(); int compReturn = DateTime.Compare(employee.GetDateOfBirth(), date); Assert.AreEqual(0, compReturn); }
public void SetDateOfBirthIntsTestInvalidLetter() { FulltimeEmployee employee = new FulltimeEmployee(); bool retVal = employee.SetDateOfBirth("1993-s2-24"); Assert.IsFalse(retVal); DateTime date = new DateTime(); int compReturn = DateTime.Compare(employee.GetDateOfBirth(), date); Assert.AreEqual(0, compReturn); }
public void SetDateOfBirthStringTestInvalidDOBafterDOH() { DateTime DOB = new DateTime(1954, 08, 20); DateTime DOH = new DateTime(1994, 09, 03); DateTime DOT = new DateTime(); FulltimeEmployee employee = new FulltimeEmployee("Brandon", "Davies", 123456789, DOB, DOH, DOT, 230000); bool retVal = employee.SetDateOfBirth("2001-12-24"); Assert.IsFalse(retVal); int compReturn = DateTime.Compare(employee.GetDateOfBirth(), DOB); Assert.AreEqual(0, compReturn); }
public void SetDateOfBirthDateTestValidDate() { FulltimeEmployee employee = new FulltimeEmployee(); DateTime date = new DateTime(1993, 05, 15); bool retVal = employee.SetDateOfBirth(date); Assert.IsTrue(retVal); int compReturn = DateTime.Compare(employee.GetDateOfBirth(), date); Assert.AreEqual(0, compReturn); }