public async Task GetUserTeamStatisticAsync_ThereAreNotTournaments_ReturnsException()
        {
            //act
            async Task actual()
            {
                await fantasySoccerService.GetUserTeamStatisticAsync();
            }

            //assert
            await Assert.ThrowsAsync <Exception>(actual);
        }
Example #2
0
        public async Task <IActionResult> IndexAsync()
        {
            if (User.Identity.IsAuthenticated)
            {
                try
                {
                    return(View(await fantasySoccerService.GetUserTeamStatisticAsync()));
                }
                catch
                {
                    return(View());
                }
            }

            return(Redirect("/Auth/SignIn"));
        }