public async Task ThenDisplayOfAcademicYearBannerIsDetermined(DateTime now, bool expectShowBanner)
        {
            _currentDateTime.Setup(x => x.Now).Returns(now);

            var model = await _orchestrator.GetAccountHomeViewModel(1);

            model.ShowAcademicYearBanner.Should().Be(expectShowBanner);
            model.ShowEmployerDemandLink.Should().BeFalse();
        }
Beispiel #2
0
        public async Task <ActionResult> Index(string message)
        {
            var providerId = int.Parse(User.Identity.GetClaim("http://schemas.portal.com/ukprn"));

            var model = await _accountOrchestrator.GetAccountHomeViewModel(providerId);

            if (!string.IsNullOrEmpty(message))
            {
                model.Message = HttpUtility.UrlDecode(message);
            }

            switch (model.AccountStatus)
            {
            case AccountStatus.NotListed:
                return(View("NoAgreement", model));

            case AccountStatus.NoAgreement:
                return(View("NoAccount"));

            case AccountStatus.Active:
            default:
                return(View(model));
            }
        }