class PersonTests(unittest.TestCase):
    def setUp(self):
        self.p = Person("Harry", "Morgan")

    def test_get_name(self):
        self.assertEqual("Morgan, Harry", self.p.get_name())

    def test_get_name_when_empty_constructor(self):
        new_person = Person()
        self.assertEqual("unknown", new_person.get_name())
Esempio n. 2
0
class PersonTests(unittest.TestCase):
    def setUp(self):
        self.p = Person("Harry", "Morgan")

    def test_get_name(self):
        self.assertEqual("Morgan, Harry", self.p.get_name())

    def test_get_name_when_empty_constructor(self):
        new_person = Person()
        self.assertEqual("unknown", new_person.get_name())
 def test_get_name_when_empty_constructor(self):
     new_person = Person()
     self.assertEqual("unknown", new_person.get_name())
 def setUp(self):
     self.p = Person("Harry", "Morgan")
Esempio n. 5
0
 def setUp(self):
     self.p = Person("Harry", "Morgan")
Esempio n. 6
0
 def test_get_name_when_empty_constructor(self):
     new_person = Person()
     self.assertEqual("unknown", new_person.get_name())