Пример #1
0
        public void ResultJson_KnowsScoresFromResult()
        {
            var resultRec = new ResultRec
            {
                Result = "67 - 105"
            };
            var cut = new ResultJson(resultRec, "AFL");

            Assert.True(cut.HomeScore == 67);
            Assert.True(cut.AwayScore == 105);
        }
Пример #2
0
 public ResultJson(
     ResultRec x,
     string league)
 {
     Round     = x.Round;
     GameDate  = x.GameDate;
     Location  = x.Location;
     League    = league;
     EventType = "result";
     HomeTeam  = x.HomeTeam;
     AwayTeam  = x.AwayTeam;
     HomeScore = HomeScoreFromResult(x.Result);
     AwayScore = AwayScoreFromResult(x.Result);
 }