예제 #1
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());
 }