def test_default_sequence(self): square = Square() square.construct_platform() square.bring_crowd() square.invite_speaker() square.speaker_talk() square.make_noise() self.assertNotEqual(square.arthur.state, "flying") square.make_noise() # at this point Arthur should be flying self.assertEqual(square.arthur.state, "flying")
def test_crowd_invites_speaker(self): ''' Just another way to make Arthur fly Crowd comes makes some noise, platform is getting build, they invite speaker and one more noise -- Arthur is flying ''' square = Square() square.bring_crowd() square.make_noise() square.construct_platform() square.invite_speaker() square.speaker_talk() self.assertNotEqual(square.arthur.state, "flying") square.make_noise() self.assertEqual(square.arthur.state, "flying")
def test_inviting_speaker_again(self): square = Square() square.construct_platform() square.invite_speaker() self.assertRaises(ValueError, square.invite_speaker)
def test_inviting_speaker_on_platform(self): square = Square() square.construct_platform() self.assertIsNotNone(square.invite_speaker())
def test_constructing_platform_again(self): square = Square() platform = square.construct_platform() self.assertRaises(RuntimeError, square.construct_platform)
def test_constructing_platform(self): square = Square() platform = square.construct_platform() self.assertIsNotNone(platform)