예제 #1
0
    def test_should_set_name(self):
        # Arrange & Act
        playbook = FootballPlaybook() \
                    .name('MyPlaybook')

        # Assert
        self.assertEqual(playbook.get_name(), 'MyPlaybook')
예제 #2
0
    def test_add_kickoff_kicking_play_should_be_able_to_add(self):
        # Arrange
        play = Mock(spec=KickOffKickingPlay)

        # Act
        playbook = FootballPlaybook() \
                    .add_kickoff_kicking_play(play)

        # Assert
        self.assertTrue(play in playbook.get_kickoff_kicking_plays())
예제 #3
0
    def test_add_defense_play_should_be_able_to_add(self):
        # Arrange
        play = Mock(spec=DefensePlay)

        # Act
        playbook = FootballPlaybook() \
                    .add_defense_play(play)

        # Assert
        self.assertTrue(play in playbook.get_defense_plays())
예제 #4
0
    def test_remove_kickoff_receiving_play_be_able_to_remove(self):
        # Arrange
        play = Mock(spec=KickOffReceivingPlay)

        # Act
        playbook = FootballPlaybook() \
                    .add_kickoff_receiving_play(play) \
                    .remove_kickoff_receiving_play(play)

        # Assert
        self.assertFalse(play in playbook.get_kickoff_receiving_plays())
예제 #5
0
    def test_remove_defense_play_be_able_to_remove(self):
        # Arrange
        play = Mock(spec=DefensePlay)

        # Act
        playbook = FootballPlaybook() \
                    .add_defense_play(play) \
                    .remove_defense_play(play)

        # Assert
        self.assertFalse(play in playbook.get_defense_plays())