def testparseGameResultBigScore(self):
     game_result = GameResult('TeamA 11, TeamB 2')
     game_result.parseGameResult()
     self.assertEqual(game_result._home_team_score, 11)
     self.assertEqual(game_result._away_team_score, 2)
     self.assertEqual(game_result.home_team, 'TeamA')
     self.assertEqual(game_result.away_team, 'TeamB')        
 def testparseGameResultAwayTeamNameWithSpace(self):
     game_result = GameResult('TeamA 0, Team B 2')
     game_result.parseGameResult()
     self.assertEqual(game_result._home_team_score, 0)
     self.assertEqual(game_result._away_team_score, 2)
     self.assertEqual(game_result.home_team, 'TeamA')
     self.assertEqual(game_result.away_team, 'Team B')
 def testSetTeamGamePointsDraw(self):
     game_result = GameResult('')
     game_result._home_team_score = 0
     game_result._away_team_score = 0
     game_result.setTeamGamePoints()
     self.assertEqual(game_result.home_team_points, 1, 'Draw should be 1 point')
     self.assertEqual(game_result.home_team_points, 1, 'Draw should be 1 point')
 def testparseGameResultHomeTeamNameWithSpace(self):
     game_result = GameResult('TeamWithVeryLongName Space 1, TeamB 2')
     game_result.parseGameResult()
     self.assertEqual(game_result._home_team_score, 1)
     self.assertEqual(game_result._away_team_score, 2)
     self.assertEqual(game_result.home_team, 'TeamWithVeryLongName Space')
     self.assertEqual(game_result.away_team, 'TeamB')
 def testSetTeamGamePointsAwayWin(self):
     game_result = GameResult('')
     game_result._home_team_score = 1
     game_result._away_team_score = 2
     game_result.setTeamGamePoints()
     self.assertEqual(game_result.away_team_points, 3, 'Win should be 3 points')
     self.assertEqual(game_result.home_team_points, 0, 'Loss should be 0 points')