Esempio n. 1
0
        public ParttimeEmployee(ParttimeEmployee prev)
            : base(prev)
        {
            dateOfHire        = prev.GetDateOfHire();
            dateOfTermination = prev.GetDateOfTermination();
            hourlyRate        = prev.GetHourlyRate();

            SetType("SN");
        }
Esempio n. 2
0
        public void SetDateOfTerminationDateTestInvalidDOTbeforeDOH()
        {
            DateTime DOB = new DateTime(1954, 08, 20);
            DateTime DOH = new DateTime(1994, 09, 03);
            DateTime DOT = new DateTime(2000, 03, 23);
            ParttimeEmployee employee = new ParttimeEmployee("Brandon", "Davies", 123456789, DOB, DOH, DOT, 18);
            DateTime date = new DateTime(1992, 04, 23);
            bool retVal = employee.SetDateOfTermination(date);
            Assert.IsFalse(retVal);

            int compReturn = DateTime.Compare(employee.GetDateOfTermination(), DOT);
            Assert.AreEqual(0, compReturn);
        }
Esempio n. 3
0
        public void SetDateOfTerminationStringTestValidString()
        {
            DateTime DOB = new DateTime(1954, 08, 20);
            DateTime DOH = new DateTime(1994, 09, 03);
            DateTime DOT = new DateTime(2000, 03, 23);
            ParttimeEmployee employee = new ParttimeEmployee("Brandon", "Davies", 123456789, DOB, DOH, DOT, 18);
            bool retVal = employee.SetDateOfTermination("1999-04-24");
            Assert.IsTrue(retVal);

            DateTime date = new DateTime(1999, 04, 24);
            int compReturn = DateTime.Compare(employee.GetDateOfTermination(), date);
            Assert.AreEqual(0, compReturn);
        }