Exemple #1
0
class ManagerTests(unittest.TestCase):
    def setUp(self):
        self.m = Manager()

    def test_get_name(self):
        self.assertEqual("", self.m.get_name())

    def test_get_salary(self):
        self.assertEqual(0, self.m.get_salary())

    def test_get_bonus(self):
        self.assertEqual(0, self.m.get_bonus())

    def test_full_constructor(self):
        m = Manager("Michael", 70, 20)
        self.assertEqual("Michael", m.get_name())
        self.assertEqual(70, m.get_salary())
        self.assertEqual(20, m.get_bonus())
Exemple #2
0
 def test_full_constructor(self):
     m = Manager("Michael", 70, 20)
     self.assertEqual("Michael", m.get_name())
     self.assertEqual(70, m.get_salary())
     self.assertEqual(20, m.get_bonus())