Example #1
0
        public void ThenOpenGovernmentLicenseV3FooterLinkIsInitialised()
        {
            // arrange
            // act
            _sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);

            // assert
            _sut.Links.OfType <OpenGovernmentLicenseV3>().Where(t => t.Href.Equals("https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/")).Count().Should().Be(1);
        }
Example #2
0
        public void ThenCrownCopyrightFooterLinkIsInitialised()
        {
            // arrange
            // act
            _sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);

            // assert
            _sut.Links.OfType <CrownCopyright>().Where(t => t.Href.Equals("https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/")).Count().Should().Be(1);
        }
Example #3
0
        public void ThenBuiltByFooterLinkIsInitialised()
        {
            // arrange
            // act
            _sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);

            // assert
            _sut.Links.OfType <BuiltBy>().Where(t => t.Href.Equals("http://gov.uk/esfa")).Count().Should().Be(1);
        }
Example #4
0
        public void ThenFeedbackFooterLinkIsInitialised()
        {
            // arrange
            // act
            _sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);

            // assert
            _sut.Links.OfType <Feedback>().Where(t => t.Href.Equals("https://www.smartsurvey.co.uk/s/apprenticeshipservicefeedback/")).Count().Should().Be(1);
        }
 public NavigationMenuRepository(Func <IMvcContext> mvcContext, ISitemapViewModel sitemapViewModel, ILeftNavigation leftNavigation, IFooterViewModel footerViewModel, IHeaderViewModel headerViewModel, IFooter footer, ISitecoreHelper sitecoreHelper)
 {
     _sitecoreHelper   = sitecoreHelper;
     _headerViewModel  = headerViewModel;
     _mvcContext       = mvcContext;
     _leftNavigation   = leftNavigation;
     _footerViewModel  = footerViewModel;
     _sitemapViewModel = sitemapViewModel;
 }
Example #6
0
        public void ThenHelpFooterLinkIsInitialised()
        {
            // arrange
            var testManageApprenticeshipsBaseUrl = $"http://{Guid.NewGuid()}";

            _mockFooterConfiguration
            .Setup(m => m.ManageApprenticeshipsBaseUrl)
            .Returns(testManageApprenticeshipsBaseUrl);

            // act
            _sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);

            // assert
            _sut.Links.OfType <Help>().Where(t => t.Href.Equals($"{testManageApprenticeshipsBaseUrl}/service/help")).Count().Should().Be(1);
        }
Example #7
0
        public void ThenWhenUserContextDoesNotHaveAHashedAccountIdTheCookiesFooterLinkIsInitialised()
        {
            // arrange
            var testManageApprenticeshipsBaseUrl = $"http://{Guid.NewGuid()}";

            _mockFooterConfiguration
            .Setup(m => m.ManageApprenticeshipsBaseUrl)
            .Returns(testManageApprenticeshipsBaseUrl);

            // act
            _sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);

            // assert
            _sut.Links.OfType <Cookies>().Where(t => t.Href.Equals($"{testManageApprenticeshipsBaseUrl}/cookieConsent")).Count().Should().Be(1);
        }
Example #8
0
        public void ThenPrivacyFooterLinkIsInitialised()
        {
            // arrange
            var testManageApprenticeshipsBaseUrl = $"http://{Guid.NewGuid()}";
            var testHashedAccountId = Guid.NewGuid().ToString();

            _mockFooterConfiguration
            .Setup(m => m.ManageApprenticeshipsBaseUrl)
            .Returns(testManageApprenticeshipsBaseUrl);

            _mockUserContext
            .Setup(m => m.HashedAccountId)
            .Returns(testHashedAccountId);

            // act
            _sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);

            // assert
            _sut.Links.OfType <Privacy>().Where(t => t.Href.Equals($"{testManageApprenticeshipsBaseUrl}/service/{testHashedAccountId}/privacy")).Count().Should().Be(1);
        }