public void GetGameFilterByDateTestsSearchDateBeforeStartDateReturnsError() { var modelUtils = new ModelUtilities(); var initializer = new ModelDataInitializer(); List<GameFilter> gameFilters = initializer.InitializeGameFilters(); var actual = modelUtils.GetGameFilterByDate(gameFilters, new DateTime(2011, 07, 4)); Assert.AreEqual(null, actual); }
public void GetGameFilterByDateTestsSearchDateEqualsStartDateReturnsCorrect() { var modelUtils = new ModelUtilities(); var initializer = new ModelDataInitializer(); List<GameFilter> gameFilters = initializer.InitializeGameFilters(); var actual = modelUtils.GetGameFilterByDate(gameFilters, new DateTime(2012, 09, 4)); Assert.AreEqual("Week 01", actual.GameFilterName); }
public void GetGameFilterByDateTestsSearchDateBeforeStartDateReturnsError() { var modelUtils = new ModelUtilities(); var initializer = new ModelDataInitializer(); List <GameFilter> gameFilters = initializer.InitializeGameFilters(); var actual = modelUtils.GetGameFilterByDate(gameFilters, new DateTime(2011, 07, 4)); Assert.AreEqual(null, actual); }
public void GetGameFilterByDateTestsSearchDateEqualsEndDateReturnsCorrect() { var modelUtils = new ModelUtilities(); var initializer = new ModelDataInitializer(); List <GameFilter> gameFilters = initializer.InitializeGameFilters(); var actual = modelUtils.GetGameFilterByDate(gameFilters, new DateTime(2012, 09, 24, 23, 59, 59)); Assert.AreEqual("Week 03", actual.GameFilterName); }
protected override void Seed(SelectumContext context) { var initializer = new ModelDataInitializer(); //context.Database.ExecuteSqlCommand var users = initializer.InitializeUsers(); users.ForEach(u => context.Users.Add(u)); context.SaveChanges(); var userToUserProfiles = initializer.InitializeUserToUserProfiles(); userToUserProfiles.ForEach(utup => context.UserToUserProfiles.Add(utup)); context.SaveChanges(); var teams = initializer.InitializeTeams(); teams.ForEach(t => context.Teams.Add(t)); context.SaveChanges(); var gameFilters = initializer.InitializeGameFilters(); gameFilters.ForEach(gf => context.GameFilters.Add(gf)); context.SaveChanges(); var games = initializer.InitializeGames(); games.ForEach(g => context.Games.Add(g)); context.SaveChanges(); var gameSpreads = initializer.InitializeGameSpreads(); gameSpreads.ForEach(g => context.GameSpreads.Add(g)); context.SaveChanges(); var gameResults = initializer.InitializeGameResults(); gameResults.ForEach(gr => context.GameResults.Add(gr)); context.SaveChanges(); var userGameSelections = initializer.InitializeUserGameSelections(); userGameSelections.ForEach(ugs => context.UserGameSelections.Add(ugs)); context.SaveChanges(); var userGameResults = initializer.InitializeUserGameResults(); userGameResults.ForEach(ugr => context.UserGameResults.Add(ugr)); context.SaveChanges(); base.Seed(context); }
public void ResultsByGameControllerTestInitialize() { var initializer = new ModelDataInitializer(); Users = initializer.InitializeUsers(); Teams = initializer.InitializeTeams(); GameFilters = initializer.InitializeGameFilters(); Games = initializer.InitializeGames(); GameSpreads = initializer.InitializeGameSpreads(); GameResults = initializer.InitializeGameResults(); UserGameSelections = initializer.InitializeUserGameSelections(); UserGameResults = initializer.InitializeUserGameResults(); }
public virtual void Initialize() { var initializer = new ModelDataInitializer(); Users = initializer.InitializeUsers(); Teams = initializer.InitializeTeams(); GameFilters = initializer.InitializeGameFilters(); Games = initializer.InitializeGames(); GameSpreads = initializer.InitializeGameSpreads(); GameResults = initializer.InitializeGameResults(); UserGameSelections = initializer.InitializeUserGameSelections(); UserGameResults = initializer.InitializeUserGameResults(); }