public void InitTest() { context = new CSBC.Core.Data.CSBCDbContext(); //context.CSDBConnectionString = ConfigurationManager.ConnectionStrings["CSBCContext"]; var tester = new CSBCDbInitializer(); tester.InitSeasons(context); }
public void GetCoachByIdTest() { var context = new Core.Data.CSBCDbContext(); var testinit = new CSBCDbInitializer(); var rep = new CoachRepository(context); var dt = rep.GetCoaches((testinit.CurrentSeason).SeasonID); Assert.IsTrue(dt.Rows.Count > 0); }
public void InitTest() { using (var context = new CSBC.Core.Data.CSBCDbContext()) { var tester = new CSBCDbInitializer(); tester.InitDirectorTest(); } }
public void CleanupTest() { using (var context = new Core.Data.CSBCDbContext()) { var init = new CSBCDbInitializer(); init.DeleteTestHouseholds(context); } }
public void GetSeasonCoachesTest() { var context = new Core.Data.CSBCDbContext(); var testinit = new CSBCDbInitializer(); var rep = new CoachRepository(context); var coaches = rep.GetSeasonCoaches(testinit.CurrentSeason.SeasonID); Assert.IsTrue(coaches.Any<vw_Coaches>() ); }
public void GetCoachVolunteerTest() { var context = new Core.Data.CSBCDbContext(); var testinit = new CSBCDbInitializer(); var rep = new CoachRepository(context); var coaches = rep.GetCoachVolunteers(1, testinit.CurrentSeason.SeasonID); Assert.IsTrue(coaches.Count<vw_Coaches>() > 0); }
public void InitTest() { using (var context = new CSBCDbContext()) { var tester = new CSBCDbInitializer(); tester.InitHouseholds(context); tester.InitPersonTest(context); tester.InitColors(context); tester.InitDivision(context); tester.InitTeams(context); } }
public void CleanupDb() { var connection = Context.Database.Connection; if (connection.DataSource == "(localDb)\\v11.0") { var init = new CSBCDbInitializer(); using (Context) { init.DeleteTestPlayers(Context); init.DeleteTestTeams(); init.DeleteTestDivisions(Context); } } }
public void GetPlayersTest() { var testinit = new CSBCDbInitializer(); var context = new CSBC.Core.Data.CSBCDbContext(); var house = new Player(); var rep = new PlayerRepository(context); var players = rep.GetSeasonPlayers(testinit.CurrentSeason.SeasonID); int no = players.Count<SeasonPlayer>(); Assert.IsTrue(players.Count<SeasonPlayer>() > 1); var player = players.First(); Assert.IsTrue(player.PeopleID > 0); }
public void InitTest() { using (var context = new CSBCDbContext()) { var init = new CSBCDbInitializer(); init.InitHouseholds(context); init.InitPersonTest(context); } }
public void InitTest() { var context = new Core.Data.CSBCDbContext(); var init = new CSBCDbInitializer(); //init.InitCoaches(context); //init.InitPersonTest(context); }
public void UpdateCoachesTest() { var context = new Core.Data.CSBCDbContext(); var testinit = new CSBCDbInitializer(); var rep = new CoachRepository(context); var coach = context.Coaches.FirstOrDefault(); coach.ShirtSize = shirtSize; coach.CoachPhone = coachPhone; rep.Update(coach); var newcoach = rep.GetById(coach.CoachID); Assert.IsTrue(newcoach.ShirtSize == shirtSize); Assert.IsTrue(newcoach.CoachPhone == coachPhone); }
public void InitTest() { var context = new CSBC.Core.Data.CSBCDbContext(); var tester = new CSBCDbInitializer(); tester.InitDivision(context); }
public void InitTest() { context = new CSBC.Core.Data.CSBCDbContext(); var tester = new CSBCDbInitializer(); tester.InitUser(context); }