Esempio n. 1
0
 public void InitTest()
 {
     context = new CSBC.Core.Data.CSBCDbContext();
     //context.CSDBConnectionString = ConfigurationManager.ConnectionStrings["CSBCContext"];
     var tester = new CSBCDbInitializer();
     tester.InitSeasons(context);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public void InitTest()
 {
     using (var context = new CSBC.Core.Data.CSBCDbContext())
     {
         var tester = new CSBCDbInitializer();
         tester.InitDirectorTest();
     }
 }
Esempio n. 4
0
 public void CleanupTest()
 {
     using (var context = new Core.Data.CSBCDbContext())
     {
         var init = new CSBCDbInitializer();
         init.DeleteTestHouseholds(context);
     }
 }
Esempio n. 5
0
        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>() );
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
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);
     }
 }
Esempio n. 8
0
 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);
         }
     }
 }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
 public void InitTest()
 {
     using (var context = new CSBCDbContext())
     {
         var init = new CSBCDbInitializer();
         init.InitHouseholds(context);
         init.InitPersonTest(context);
     }
 }
Esempio n. 11
0
 public void InitTest()
 {
     var context = new Core.Data.CSBCDbContext();
     var init = new CSBCDbInitializer();
     //init.InitCoaches(context);
     //init.InitPersonTest(context);
 }
Esempio n. 12
0
 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);
 }
Esempio n. 13
0
 public void InitTest()
 {
     var context = new CSBC.Core.Data.CSBCDbContext();
     var tester = new CSBCDbInitializer();
     tester.InitDivision(context);
 }
Esempio n. 14
0
 public void InitTest()
 {
     context = new CSBC.Core.Data.CSBCDbContext();
     var tester = new CSBCDbInitializer();
     tester.InitUser(context);
 }