Esempio n. 1
0
        public FulltimeEmployee(FulltimeEmployee prev)
            : base(prev)
        {
            dateOfHire        = prev.GetDateOfHire();
            dateOfTermination = prev.GetDateOfTermination();
            salary            = prev.GetSalary();

            SetType("FT");
        }
Esempio n. 2
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);
            FulltimeEmployee employee = new FulltimeEmployee("Brandon", "Davies", 123456789, DOB, DOH, DOT, 230000);
            bool retVal = employee.SetDateOfTermination("1997-04-24");
            Assert.IsTrue(retVal);

            DateTime date = new DateTime(1997, 04, 24);
            int compReturn = DateTime.Compare(employee.GetDateOfTermination(), date);
            Assert.AreEqual(0, compReturn);
        }
Esempio n. 3
0
        public void SetDateOfTerminationStringTestInvalidDOTbeforeDOH()
        {
            DateTime DOB = new DateTime(1954, 08, 20);
            DateTime DOH = new DateTime(1994, 09, 03);
            DateTime DOT = new DateTime(2000, 03, 23);
            FulltimeEmployee employee = new FulltimeEmployee("Brandon", "Davies", 123456789, DOB, DOH, DOT, 230000);
            bool retVal = employee.SetDateOfTermination("1993-12-24");
            Assert.IsFalse(retVal);

            int compReturn = DateTime.Compare(employee.GetDateOfTermination(), DOT);
            Assert.AreEqual(0, compReturn);
        }