Esempio n. 1
0
        public async Task CanPrepareAdminHeaderLinksModel()
        {
            var model = await _commonModelFactory.PrepareAdminHeaderLinksModelAsync();

            model.ImpersonatedCustomerName.Should().Be("John");
            model.IsCustomerImpersonated.Should().BeFalse();
            model.DisplayAdminLink.Should().BeTrue();
            model.EditPageUrl.Should().BeNull();
        }
Esempio n. 2
0
        /// <returns>A task that represents the asynchronous operation</returns>
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var model = await _commonModelFactory.PrepareAdminHeaderLinksModelAsync();

            return(View(model));
        }