public EmployerUrlsTestsFixture()
        {
            EmployerUrlsConfiguration   = new Mock <IEmployerUrlsConfiguration>();
            IdentityServerConfiguration = new Mock <IOidcConfiguration>();

            IdentityServerConfiguration.Setup(c => c.ClientId).Returns("abc123");

            EmployerUrls = new EmployerUrls(EmployerUrlsConfiguration.Object, IdentityServerConfiguration.Object);
        }
        public AccountProviderLegalEntitiesControllerTestsFixture CreateSessionFromInvitation()
        {
            var context = new Mock <HttpContextBase>();
            var session = new Mock <HttpSessionStateBase>();

            session.Setup(s => s["Invitation"]).Returns(true);
            context.Setup(x => x.Session).Returns(session.Object);
            EmployerUrls.Setup(e => e.Account(It.IsAny <string>())).Returns("https://localhost/accounts/ABC123/teams");

            AccountProviderLegalEntitiesController.ControllerContext = new ControllerContext(context.Object, new RouteData(), AccountProviderLegalEntitiesController);
            return(this);
        }
        public ActionResult PostUpdated(string choice = null)
        {
            UpdatedAccountProviderLegalEntityViewModel = new UpdatedAccountProviderLegalEntityViewModel
            {
                AccountProviderId = 2,
                Choice            = choice
            };

            EmployerUrls.Setup(eu => eu.Account(null))
            .Returns($"https://localhost/accounts/ABC123/teams");

            return(AccountProviderLegalEntitiesController.Updated(UpdatedAccountProviderLegalEntityViewModel));
        }
Beispiel #4
0
        public ActionResult PostAdded(string choice = null)
        {
            AddedAccountProviderViewModel = new AddedAccountProviderViewModel
            {
                AccountProviderId = 2,
                Choice            = choice
            };

            EmployerUrls.Setup(eu => eu.Account(null))
            .Returns($"https://localhost/accounts/ABC123/teams");

            return(AccountProvidersController.Added(AddedAccountProviderViewModel));
        }