Ejemplo n.º 1
0
 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))
Ejemplo n.º 2
0
 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]')
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
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)