Пример #1
0
 public void HomeTest()
 {
     Club home = new Club("France");
     Club away = new Club("Allemagne");
     int homeGoal = 3;
     int awayGoal = 3;
     Match match = new Match(home, away, homeGoal, awayGoal);
     Assert.IsNotNull(home);
 }
Пример #2
0
 public void IsAwayForfaitTest()
 {
     Club home = new Club("France");
     Club away = new Club("Allemagne");
     int homeGoal = 3;
     int awayGoal = -1;
     Match match = new Match(home, away, homeGoal, awayGoal);
     Assert.IsTrue(match.IsAwayForfait);
 }
Пример #3
0
 public void MatchConstructorTest()
 {
     Club home = new Club("France");
     Club away = new Club("Allemagne");
     int homeGoal = 0;
     int awayGoal = 0;
     Match match = new Match(home,away,homeGoal,awayGoal);
     Assert.IsNotNull(match);
 }
Пример #4
0
 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);
 }
Пример #5
0
 public ITotal GetPointsFromMatch(Match m, bool home)
 {
     return this.InitialPoints;
 }
 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);
 }