コード例 #1
0
ファイル: Over.Specs.cs プロジェクト: yavaka/CricketTeams
        public OverSpecs()
        {
            this._bowler     = PlayerFakes.Data.GetPlayer(1);
            this._striker    = PlayerFakes.Data.GetPlayer(2);
            this._nonStriker = PlayerFakes.Data.GetPlayer(3);

            this._over = OverFakes.Data.GetOver(
                this._bowler,
                this._striker,
                this._nonStriker);
        }
コード例 #2
0
            public static Over GetEndedOver(
                Player bowler,
                Player striker,
                Player nonStriker)
            {
                var balls = BallFakes.Data.GetBalls(6);

                var over = new Over(bowler, striker, nonStriker);

                foreach (var ball in balls)
                {
                    over.UpdateCurrentBallWithRuns(ball.Runs);
                }
                return(over);
            }