Beispiel #1
0
        public ActionResult Index()
        {
            var sports = sportServices.GetAllSports();
            var teams  = teamServices.GetAllTeams();
            var games  = gameServices.GetAllGames();

            var vm = new MainPage(sports, teams, games);

            return(View(vm));
        }
Beispiel #2
0
        public void GetAllTeams()
        {
            TeamServices services = new TeamServices(login, teamRepository, sportRepository, userRepository);
            Team         boca     = new Team("Boca", new Sport("Futbol"));
            Team         river    = new Team("River", new Sport("Futbol"));

            teamRepository.Add(boca);
            teamRepository.Add(river);

            IEnumerable <TeamDTO> recovered = services.GetAllTeams();

            Assert.AreEqual(2, recovered.ToList().Count);
        }