Esempio n. 1
0
        private async Task SetBreadcrumb(Guid?schemeId, Guid?aatfId, Guid organisationId, FacilityType?facilityType)
        {
            if (schemeId.HasValue && !aatfId.HasValue)
            {
                breadcrumb.InternalActivity = InternalUserActivity.ManageScheme;
                breadcrumb.InternalScheme   = await cache.FetchSchemeName(schemeId.Value);
            }
            if (!schemeId.HasValue && aatfId.HasValue)
            {
                switch (facilityType)
                {
                case FacilityType.Aatf:
                    breadcrumb.InternalActivity = InternalUserActivity.ManageAatfs;
                    breadcrumb.InternalAatf     = (await cache.FetchAatfData(organisationId, aatfId.Value)).Name;
                    break;

                case FacilityType.Ae:
                    breadcrumb.InternalActivity = InternalUserActivity.ManageAes;
                    breadcrumb.InternalAe       = (await cache.FetchAatfData(organisationId, aatfId.Value)).Name;
                    break;

                default:
                    break;
                }
            }
        }
Esempio n. 2
0
        private async Task SetBreadcrumb(Guid?schemeId, string activity)
        {
            breadcrumb.InternalActivity = activity;

            if (schemeId.HasValue)
            {
                breadcrumb.InternalScheme = await cache.FetchSchemeName(schemeId.Value);
            }
        }
        public async Task GetEditRegisteredCompanyOrganisationDetails_GivenSchemeId_BreadCrumbShouldBeSet()
        {
            var          schemeId     = Guid.NewGuid();
            const string organisation = "organisation";

            A.CallTo(() => cache.FetchSchemeName(schemeId)).Returns(organisation);
            await controller.EditRegisteredCompanyOrganisationDetails(schemeId, A.Dummy <Guid>(), A.Dummy <Guid>(), FacilityType.Aatf);

            breadcrumb.InternalActivity     = InternalUserActivity.ManageScheme;
            breadcrumb.InternalOrganisation = organisation;
        }