public MatchResult GetMatchResult(int teamAID, int teamBID) { var mr = new MatchResult(); mr.SetTeamAID(teamAID); mr.SetTeamBID(teamBID); mr.SetTeamAScore(teamAScore); mr.SetTeamBScore(teamBScore); return mr; }
public void MatchStringTest() { var match = new MatchResult(); match.SetTeamAID(1); match.SetTeamBID(2); var scoreTeamA = new Score(); var scoreTeamB = new Score(); match.SetTeamAScore(scoreTeamA); match.SetTeamBScore(scoreTeamB); // Assert.AreEqual(match.ToString(), "1: tag: 0, flag: 0, score 0, 2: tag: 0, flag: 0, score 0"); }
public MatchResult Clone() { var mr = new MatchResult(); mr.SetMatchID(matchID); mr.SetTeamAID(teamAID); mr.SetTeamAScore(teamAScore); mr.SetTeamBID(teamBID); mr.SetTeamBScore(teamBScore); mr.SetPlayed(played); if (dummyGame) { mr.SetDummyGame(dummyGame); } return mr; }
public void MatchWinnerTests() { var match = new MatchResult(); match.SetTeamAID(1); match.SetTeamBID(2); var scoreTeamA = new Score(); var scoreTeamB = new Score(); for(int i = 0; i < 3; i++) { scoreTeamA.AddTag(); } scoreTeamA.AddFlag(); for(int i = 0; i < 10; i++) { scoreTeamB.AddTag(); } match.SetTeamAScore(scoreTeamA); match.SetTeamBScore(scoreTeamB); Assert.AreEqual(2, match.GetWinner()); }