public void GetExperts_Should_Fetch_All_Experts()
        {
            var expertService  = new ExpertService(_mockContext.Object);
            var fetchedExperts = expertService.GetExperts();

            Assert.Equal(_testData, fetchedExperts);
        }
Esempio n. 2
0
        public ActionResult PredictionsDisplay()
        {
            var experts   = _expertService.GetExperts();
            var tours     = _tourService.GetLastTournamentTours();
            var viewModel = new PredictionsDisplayViewModel(experts, tours);

            return(View(viewModel));
        }
Esempio n. 3
0
        public ActionResult EditPredictions(int tourId, int expertId = 1, bool addPredictionSuccess = false)
        {
            var experts = _expertService.GetExperts();
            var tourDto = _tourService.GetTourDto(tourId);
            //var matches = _matchService.GetLastTournamentMatchesByTourId(tourId).ToList();
            var matches   = _matchService.GetTourSchedule(tourId);
            var scorelist = _predictionService.GeneratePredictionlist(tourId, expertId, true);
            var viewModel = new EditPredictionsViewModel(matches, experts, scorelist, tourDto, expertId, addPredictionSuccess);

            return(View(viewModel));
        }