def setUp(self): self.dog = Dog() self.cat = Cat() self.human = Human() self.car = Car()
def test_human_adapter_shall_make_noise(self): human = Human() human_adapter = Adapter(human, make_noise=human.speak) noise = human_adapter.make_noise() expected_noise = "'hello'" self.assertEqual(noise, expected_noise)