public PointTotal(Match m, bool home) { points = m.HomeGoals + m.AwayGoals; if (home) goalaverage = m.HomeGoals - m.AwayGoals; else goalaverage = m.AwayGoals - m.HomeGoals; }
public void Register(Match m) { EntryFromClub(m.Home).Points.Increment(system.GetPointsFromMatch(m, true)); EntryFromClub(m.Away).Points.Increment(system.GetPointsFromMatch(m, false)); Array.Sort(entries); }
public Itotal GetPointsFromMatch(Match m, bool isHome) { return new Itotal(m, isHome); }
public void PeutSavoirSiLeClubHomeAFaitForfait() { Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, true, false); Assert.AreEqual(true, unMatch.IsHomeForfeit); }
public void PeutSavoirSiLesCLubOntFaitUnMatchNull() { Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, 1, 1); Assert.AreEqual(true, unMatch.IsDraw); }
public void PeutRetournerLeBonNombreDeButDuClubHome() { Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, 1, 0); Assert.AreEqual(1, unMatch.HomeGoals); }
public void PeutRetournerLeBonClubHome() { Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, false, false); Assert.AreEqual(unMatch.Home, unClubBienPourriHome); }
public void PeutRetourneLeBonNombreDeButDuClubAway() { Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, 0, 1); Assert.AreEqual(1, unMatch.AwayGoals); }
public TotalMock(Match m, bool home) { this.points = m.GetGoals(home) - m.GetGoals(!home); }
public override ITotal GetPointsFromMatch(Match m, bool isHome) { return new TotalMock(m, isHome); }