Example #1
0
        public override void Given()
        {
            season = new Season("test", GameType.EightBall);
              season.SetIdTo(1);

              repository.Setup(r => r.Get<Season>(season.Id)).Returns(season);
        }
Example #2
0
 public override void Given()
 {
     season = new Season("Test", GameType.EightBall);
       season.SetIdTo(1);
       repository.Setup(r => r.Get<Season>(season.Id)).Returns(season);
       repository.Setup(r => r.Delete(season)).Verifiable();
       pageRouteValue = new KeyValuePair<string, object>("page", page);
 }
Example #3
0
 public override void Given()
 {
     var season = new Season("name", GameType.EightBall);
       season.SetIdTo(id);
       season.IsActive = true; // will make CanDelete() return false
       repository.Setup(r => r.Get<Season>(season.Id)).Returns(season);
       pageRouteValue = new KeyValuePair<string, object>("page", page);
 }
Example #4
0
 public override void Given()
 {
     var season = new Season("temp", GameType.EightBall);
       season.SetIdTo(1);
       division = new Division("temp", DateTime.Now, season);
       season.AddDivision(division);
       division.SetIdTo(1);
       repository.Setup(r => r.Get<Division>(division.Id)).Returns(division);
 }
Example #5
0
 public override void Given()
 {
     var user = new User("Test", "test", "test", "test", "test");
       user.SetIdTo(id);
       authService.MockPrincipal.User = user;
       var season = new Season("Test", GameType.EightBall);
       season.SetIdTo(id);
       season.IsActive = true;
       var seasons = new List<Season>();
       seasons.Add(season);
       repository.Setup(r => r.All<Season>()).Returns(seasons.AsQueryable());
       var division = new Division("Test", DateTime.Now, season);
       var team = new Team("Test", division);
       team.SetIdTo(id);
       team.AddPlayer(user);
       repository.Init<Team>(new List<Team> { team }.AsQueryable());
 }