示例#1
0
文件: Match.cs 项目: savinienL/EPSI
 public Match(Club home, Club away, int hgoals, int goals)
 {
     this.home = home;
     this.away = away;
     this.hgoals = hgoals;
     this.goals = goals;
 }
示例#2
0
文件: Match.cs 项目: savinienL/EPSI
 public Match(Club leClub, String leType)
 {
     if (leType.Equals("home"))
         this.home = leClub;
        else
         this.away = leClub;
 }
示例#3
0
 public void ToStringTest()
 {
     string name = "France";
     Club target = new Club(name);
     string actual = target.ToString();
     Assert.AreEqual(name, actual);
 }
示例#4
0
 public void HomeGoalsTest()
 {
     Club home = new Club("France");
        Match target = new Match(3, "home");
        int actualHomeGoals;
        actualHomeGoals = target.HomeGoals;
        Assert.AreEqual(actualHomeGoals, 3);
 }
示例#5
0
 public void AwayTest()
 {
     Club away = new Club("Italie");
     Match target = new Match(away, "away");
     Club actualAway;
     actualAway = target.Away;
     Assert.AreEqual(actualAway, away);
 }
示例#6
0
 public void ClubConstructorTest()
 {
     string name = "France";
     Club target = new Club(name);
     string actual;
     actual = target.ToString();
     Assert.AreEqual(actual, name);
 }
示例#7
0
 public void AwayGoalsTest()
 {
     Club home = new Club("France");
     Club away = new Club("Italie");
     Match target = new Match(home, away, 3, 0);
     int actualAwayGoals;
     actualAwayGoals = target.AwayGoals;
     Assert.AreEqual(actualAwayGoals, 0);
 }
示例#8
0
文件: Match.cs 项目: savinienL/EPSI
        public Match(Club home, Club away, bool isForfeit, string whoIsForfeit)
        {
            this.home = home;
            this.away = away;

            if(whoIsForfeit.Equals("home"))
                this.isHomeForfeit = isForfeit;
            else if (whoIsForfeit.Equals("away"))
                this.isAwayForfeit = isForfeit;
            else
            {
                this.isHomeForfeit = isForfeit;
                this.isAwayForfeit = isForfeit;
            }
        }
示例#9
0
 public void MatchConstructorTest1()
 {
     Club home = new Club("France");
     Club away = new Club("Italie");
     bool isBothForfeit = false;
     Match target = new Match(home, away, isBothForfeit,"");
     Club actualHome = target.Home;
     Club actualAway = target.Away;
     bool actualForfeit = target.IsHomeForfeit;
     Assert.AreEqual(actualHome, home);
     Assert.AreEqual(actualAway, away);
     Assert.AreEqual(actualForfeit, isBothForfeit);
 }
示例#10
0
        public void MatchConstructorTest()
        {
            Club home = new Club("France");
            Club away = new Club("Italie");
            int hgoals = 0;
            int goals = 1;
            Match target = new Match(home, away, hgoals, goals);

            Club actualHome = target.Home;
            Club actualAway = target.Away;
            int homeGoals = target.HomeGoals;
            int awayGoals = target.AwayGoals;
            Assert.AreEqual(actualHome, home);
            Assert.AreEqual(actualAway, away);
            Assert.AreEqual(homeGoals, hgoals);
            Assert.AreEqual(awayGoals, goals);
        }
示例#11
0
 public void isHomeForfaitTest()
 {
     Club home = new Club("France");
     Club away = new Club("Italie");
     bool isHomeForfeit = true;
     Match target = new Match(home, away, isHomeForfeit,"home");
     bool actual = target.IsHomeForfeit;
     Assert.AreEqual(isHomeForfeit, actual);
 }
示例#12
0
 public Itotal GetPoints(Club club)
 {
     throw new System.NotImplementedException();
 }
示例#13
0
 public RankingEntry EntryFromClub(Club c)
 {
     throw new System.NotImplementedException();
 }
示例#14
0
 public void HomeTest()
 {
     Club home = new Club("France");
        Match target = new Match(home, "home");
        Club actualHome = target.Home;
        Assert.AreEqual(actualHome, home);
 }
示例#15
0
 public void isDrawTest()
 {
     Club home = new Club("France");
     Club away = new Club("Italie");
     Match target = new Match(home, away, 3, 3);
     bool actual = target.IsDraw;
     Assert.AreEqual(true, actual);
 }
示例#16
0
 public void IsAwayForfeitTest()
 {
     Club home = new Club("France"); // TODO: initialisez à une valeur appropriée
     Club away = new Club("Italie"); // TODO: initialisez à une valeur appropriée
     bool isAwayForfeit = false; // TODO: initialisez à une valeur appropriée
     Match target = new Match(home, away, isAwayForfeit,"away"); // TODO: initialisez à une valeur appropriée
     bool actualAwayForfeit;
     actualAwayForfeit = target.IsAwayForfeit;
     Assert.AreEqual(isAwayForfeit, actualAwayForfeit);
 }
示例#17
0
 public Match(Club home, Club away, bool isHomeForfeit)
 {
 }