class EmployeeTests(unittest.TestCase): def setUp(self): self.e = Employee() def test_get_name(self): self.assertEqual("", self.e.get_name()) def test_get_salary(self): self.assertEqual(0, self.e.get_salary()) def test_set_name(self): self.e.set_name("Regular") self.assertEqual("Regular", self.e.get_name()) def test_set_salary(self): self.e.set_base_salary(70) self.assertEqual(70, self.e.get_salary()) def test_full_constructor(self): e = Employee("John", 60) self.assertEqual("John", e.get_name()) self.assertEqual(60, e.get_salary())
def test_full_constructor(self): e = Employee("John", 60) self.assertEqual("John", e.get_name()) self.assertEqual(60, e.get_salary())
def setUp(self): self.e = Employee()