def test_screen_ft(self): """Asserts a full time employee's data is returned correctly by the screen function""" shepard = employees.Fulltime(name='Jane Shepard', longevity=3.0) self.assertEqual( 'Name: Jane Shepard [FT], Duration: 3.0 years, ' 'Vacation Accrued: 15 days', screen_info.screen(shepard))
def test_fulltime_type(self): """Asserts a full time employee's type is '[FT]'""" shepard = employees.Fulltime(name='Jane Shepard', longevity=1.0) self.assertTrue(shepard.type == '[FT]')
def test_ft_vacation_more_than_1(self): """Asserts a full time employee with 2.5 years of employment has 10 vacation days""" shepard = employees.Fulltime(name='Jane Shepard', longevity=2.5) self.assertEqual(shepard.vacation, 10)
def test_ft_vacation_1(self): """Asserts a full time employee with one year of employment has 5 vacation days""" shepard = employees.Fulltime(name='Jane Shepard', longevity=1.0) self.assertEqual(shepard.vacation, 5)
def test_ft_vacation_less_than_1(self): """Asserts a full time employee with less than one but more than zero years of employment has 0 vacation days""" shepard = employees.Fulltime(name='Jane Shepard', longevity=0.8) self.assertEqual(shepard.vacation, 0)
def test_ft_vacation_0(self): """Asserts a full time employee with zero years of employment has 0 vacation days""" shepard = employees.Fulltime(name='Jane Shepard', longevity=0) self.assertEqual(shepard.vacation, 0)