コード例 #1
0
ファイル: MatchTest.cs プロジェクト: Bastienp/TP3-Dotnet
 public void GetGoalsTestAwayAndHome()
 {
     Match target = new Match(new Club("Bordeaux"), new Club("Marseille"));
     target.AwayGoals = 2;
     target.HomeGoals = 1;
     Assert.AreEqual(2, target.GetGoals(false));
     Assert.AreEqual(1, target.GetGoals(true));
 }
コード例 #2
0
            public PointTotal(Match m, bool home)
            {
                this.goalaverage = m.GetGoals(home) - m.GetGoals(!home);

                int result = m.GetGoals(home) - m.GetGoals(!home);
                if (result > 0)
                {
                    this.points += 1;
                }
                else
                {
                    this.points += 0;
                }
            }
コード例 #3
0
ファイル: MatchTest.cs プロジェクト: Bastienp/TP3-Dotnet
 public void GetGoalsTestAway()
 {
     Match target = new Match(new Club("Bordeaux"), new Club("Marseille"));
     target.AwayGoals = 2;
     Assert.AreEqual(2, target.GetGoals(false));
 }
コード例 #4
0
 public TotalMock(Match m, bool home)
 {
     this.points = m.GetGoals(home) - m.GetGoals(!home);
 }