private GameDay getGameDay() { GameDayModel gdModel = new GameDayModel(); GameDay gd = new GameDay(gdModel); return(gd); }
public void TestPutInGameDay_WhenGiven_ThenUpdated() { Guid expected = Guid.NewGuid(); GameDayModel gdModel = new GameDayModel() { Id = expected }; GameDay gd = new GameDay(gdModel); this.dut.PutInGameDay(gd); Assert.True(expected.Equals(this.model.GameDay)); }
public StreakViewModel StreakFor( DateTime startDate, DateTime endDate) { var result = new StreakViewModel { StartDate = startDate, EndDate = endDate, OptionSettings = _picker.GetOptions().OptionStrings() }; TimeSpan range = endDate - startDate; for (int i = 0; i < range.TotalDays + 1; i++) { var gameDate = startDate.AddDays(i); var selection = _picker.Choose( gameDate: gameDate, numberRequired: NumberOfBattersRequired()); //selection.Dump(); if (selection.Selections.Count > 0) { foreach (var batter in selection.Selections) { if (batter == null) { continue; } batter.Result = _resultChecker.Result( batter.Batter, gameDate); } } var gameDay = new GameDayModel { GameDate = gameDate, Selections = selection.Selections }; result.GameDays.Add(gameDay); } return(result); }
/// <summary> /// Creates an new empty GameDay. /// </summary> /// <param name="givenModel">The GameDayModel that holds data about this GameDay.</param> public GameDay(GameDayModel givenModel) { this.model = givenModel; this.games = new List <Game>(); }