public void GetAll_should_return_list_of_platforms() { //Arrange _platformRepository.Setup(x => x.GetAll()).Returns(new List <PlatformType>() as IOrderedQueryable <PlatformType>); //Act var platforms = _platformService.GetAll(); //Assert platforms.Should().NotBeNull(); }
public IActionResult Index() { GameIndexViewModel viewModel = new GameIndexViewModel { Games = gameService.GetAll(), Genres = genreService.GetAll(), Developers = developerService.GetAll(), Publishers = publisherService.GetAll(), Platforms = platformService.GetAll(), Reviews = reviewService.GetAll() }; return(View(viewModel)); }
public GamesViewModel SetupViewModel(PaginatedList <GameScore> gamescores) { return(new GamesViewModel { Platforms = _platformService.GetAll(), Statuses = _statusService.GetAll(), Genres = _genreService.GetAll(), Series = _seriesService.GetAll(), Publishers = _companyService.GetAll(), Developers = _companyService.GetAll(), Languages = _languageService.GetAll(), Tags = _tagService.GetAll(), GamesScores = gamescores }); }
public IActionResult Index() { PlatformIndexViewModel viewModel = new PlatformIndexViewModel { Platforms = platformService.GetAll(), PlatformTypes = platformTypeService.GetAll() }; return(View(viewModel)); }
public async Task <IActionResult> Select() { var categories = await _contentManager.GetAll(); var platforms = await _platformManager.GetAll(); var model = new SelectContentsViewModel { Categories = categories, Platforms = platforms, SelectedCategories = new List <Category>(), SelectedPlatforms = new List <Platform>() }; return(View(model)); }
public ActionResult Index() { return(View(_platformService.GetAll())); }
public IEnumerable <PlatformModel> GetPlatforms() { return(Mapper.Map <IEnumerable <PlatformModel> >(_platformService.GetAll())); }