Esempio n. 1
0
        public League Build()
        {
            if (nationalLeague == null)
            {
                nationalLeague = A.NationalLeague.Build();
            }

            return new League(nationalLeague, "Test", level, DayOfWeek.Saturday, 1, hasReturnRound);
        }
        public NationalLeague Build()
        {
            if (world == null)
            {
                world = A.World.Build();
            }

            var nationalLeague = new NationalLeague(world, "Test");

            if (divisionCount > 0)
            {
                var divisions = A.League.ForNationalLeague(nationalLeague).Repeat(divisionCount);

                foreach (var division in divisions)
                {
                    nationalLeague.AddDivision(division);
                }
            }

            nationalLeague.PlayOffs = new LeaguePlayOffs(nationalLeague, "Test", DayOfWeek.Wednesday);

            return nationalLeague;
        }
Esempio n. 3
0
 private LeagueSeason CreateLeagueSeason(IEnumerable<Team> teams)
 {
     var nationalLeague = new NationalLeague(world, "Test");
     var division = new League(nationalLeague, "Test", 1, DayOfWeek.Saturday, 1);
     return new LeagueSeason(division, new DateTime(2012, 08, 01), new DateTime(2013, 05, 30), teams.ToArray());
 }
Esempio n. 4
0
 public LeagueBuilder ForNationalLeague(NationalLeague nationalLeague)
 {
     this.nationalLeague = nationalLeague;
     return this;
 }