Ejemplo n.º 1
0
 public BaseController(IMapper mapper, ILeagueData leagueData, IPecTecClient client, IStaticDataRetrieve data, IChampionRepository champRepo)
 {
     Mapper     = mapper ?? throw new ArgumentNullException(nameof(mapper));
     LeagueData = leagueData ?? throw new ArgumentNullException(nameof(leagueData));
     Client     = client ?? throw new ArgumentNullException(nameof(client));
     Data       = data ?? throw new ArgumentNullException(nameof(data));
     ChampRepo  = champRepo ?? throw new ArgumentNullException(nameof(champRepo));
 }
Ejemplo n.º 2
0
 public LeagueData(IClient client, IMapper mapper, IChampionRepository championRepo, ILiveDataRetrieve liveData, IStaticDataRetrieve data, ISummonerRepository summonerRepo)
 {
     _client       = client;
     _mapper       = mapper;
     _championRepo = championRepo;
     _liveData     = liveData;
     _data         = data;
     _summonerRepo = summonerRepo;
 }
        public void SetUp()
        {
            dataContextMock = MockRepository.GenerateMock<IDataContext>();
            championRepositoryMock = MockRepository.GenerateMock<IChampionRepository>();
            championRecalculatorPartialMock = MockRepository.GeneratePartialMock<ChampionRecalculator>(dataContextMock,
                championRepositoryMock);

            List<GameDefinition> allGameDefinitions = new List<GameDefinition>
            {
                new GameDefinition { Active = true, Id = 1 },
                new GameDefinition { Active = true, Id = 2 },
                new GameDefinition { Active = false, Id = 3 }
            };

            allGameDefinitionsQueryable = allGameDefinitions.AsQueryable();

            dataContextMock.Expect(mock => mock.GetQueryable<GameDefinition>()).Return(allGameDefinitionsQueryable);
        }
Ejemplo n.º 4
0
        public void SetUp()
        {
            championRepositoryMock = MockRepository.GenerateMock <IChampionRepository>();
            dataContextMock        = MockRepository.GenerateMock <IDataContext>();
            championRecalculator   = new ChampionRecalculator(dataContextMock, championRepositoryMock);
            applicationUser        = new ApplicationUser();

            gameDefinition = new GameDefinition
            {
                ChampionId = previousChampionId
            };
            dataContextMock.Expect(mock => mock.FindById <GameDefinition>(gameDefinitionId))
            .Return(gameDefinition);
            savedChampion = new Champion {
                Id = newChampionId
            };
            dataContextMock.Expect(mock => mock.Save(Arg <Champion> .Is.Anything, Arg <ApplicationUser> .Is.Anything))
            .Return(savedChampion);
        }
Ejemplo n.º 5
0
        public void SetUp()
        {
            dataContextMock                 = MockRepository.GenerateMock <IDataContext>();
            championRepositoryMock          = MockRepository.GenerateMock <IChampionRepository>();
            championRecalculatorPartialMock = MockRepository.GeneratePartialMock <ChampionRecalculator>(dataContextMock,
                                                                                                        championRepositoryMock);

            List <GameDefinition> allGameDefinitions = new List <GameDefinition>
            {
                new GameDefinition {
                    Active = true, Id = 1
                },
                new GameDefinition {
                    Active = true, Id = 2
                },
                new GameDefinition {
                    Active = false, Id = 3
                }
            };

            allGameDefinitionsQueryable = allGameDefinitions.AsQueryable();

            dataContextMock.Expect(mock => mock.GetQueryable <GameDefinition>()).Return(allGameDefinitionsQueryable);
        }
Ejemplo n.º 6
0
 public ChampionRecalculator(IDataContext dataContext, IChampionRepository championRepository)
 {
     this.dataContext = dataContext;
     this.championRepository = championRepository;
 }
Ejemplo n.º 7
0
 public ChampionRecalculator(IDataContext dataContext, IChampionRepository championRepository)
 {
     this.dataContext        = dataContext;
     this.championRepository = championRepository;
 }
 public ChampionServices(IChampionRepository championService)
 {
     _championRepository = championService;
 }
Ejemplo n.º 9
0
 public ChampionRecalculator(IDataContext dataContext, IChampionRepository championRepository)
 {
     _dataContext        = dataContext;
     _championRepository = championRepository;
 }
Ejemplo n.º 10
0
 public ChampionService(IChampionRepository championRepository, IMapper mapper)
 {
     _championRepository = championRepository;
     _mapper             = mapper;
 }
 public SearchController(IMapper mapper, ILeagueData leagueData, IPecTecClient client, IStaticDataRetrieve data, IChampionRepository champRepo) : base(mapper, leagueData, client, data, champRepo)
 {
 }
Ejemplo n.º 12
0
 public UnitOfWork(LeagueItemsContext context, IChampionRepository championRepository, IItemRepository itemRepository)
 {
     Context = context;
     ChampionRepository = championRepository;
     ItemRepository = itemRepository;
 }
 public ChampionDataService(IChampionRepository ChampionRepository)
 {
     this._championRepository = ChampionRepository;
 }
Ejemplo n.º 14
0
 public UsurperAchievement(IDataContext dataContext, IChampionRepository championRepository) : base(dataContext)
 {
     _championRepository = championRepository;
 }