public UpdateSchemeContactDetailsHandler(IWeeeAuthorization authorization, IOrganisationDetailsDataAccess dataAccess, IWeeeEmailService weeeEmailService) { this.authorization = authorization; this.dataAccess = dataAccess; this.weeeEmailService = weeeEmailService; }
public OrganisationUserRequestCompletedEventHandlerTests() { this.emailService = A.Fake <IWeeeEmailService>(); this.dataAccess = A.Fake <IOrganisationUserRequestEventHandlerDataAccess>(); this.handler = new OrganisationUserRequestCompletedEventHandler(dataAccess, emailService); }
public OrganisationUserRequestEventHandlerTests() { dataAccess = A.Fake <IOrganisationUserRequestEventHandlerDataAccess>(); emailService = A.Fake <IWeeeEmailService>(); handler = new OrganisationUserRequestEventHandler(dataAccess, emailService); }
public SchemeDataReturnSubmissionEventHandler( IWeeeEmailService weeeEmailService, ISchemeDataReturnSubmissionEventHandlerDataAccess dataAccess) { this.weeeEmailService = weeeEmailService; this.dataAccess = dataAccess; }
public UnauthenticatedUserController( ApplicationUserManager userManager, IUserContext userContext, IWeeeEmailService emailService, IGetAdminUserDataAccess getAdminUserDataAccess) { this.userManager = userManager; this.userContext = userContext; this.emailService = emailService; this.getAdminUserDataAccess = getAdminUserDataAccess; }
public async Task CreateExternalUser_WithValidModel_IssuesCanAccessExternalAreaClaim() { // Arrange ApplicationUser capturedUser = null; ApplicationUserManager userManager = A.Fake <ApplicationUserManager>(); A.CallTo(() => userManager.CreateAsync(A <ApplicationUser> ._)) .Invokes((ApplicationUser user) => capturedUser = user) .Returns(IdentityResult.Success); A.CallTo(() => userManager.CreateAsync(A <ApplicationUser> ._, A <string> ._)) .Invokes((ApplicationUser user, string password) => capturedUser = user) .Returns(IdentityResult.Success); IUserContext userContext = A.Fake <IUserContext>(); IWeeeEmailService emailService = A.Fake <IWeeeEmailService>(); IGetAdminUserDataAccess getAdminUserDataAccess = A.Dummy <IGetAdminUserDataAccess>(); UnauthenticatedUserController controller = new UnauthenticatedUserController( userManager, userContext, emailService, getAdminUserDataAccess); ExternalUserCreationData model = new ExternalUserCreationData() { FirstName = "John", Surname = "Smith", Email = "*****@*****.**", Password = "******", ConfirmPassword = "******", ActivationBaseUrl = "ActivationBaseUrl" }; // Act await controller.CreateExternalUser(model); // Assert Assert.NotNull(capturedUser); int claimCount = capturedUser.Claims.Count( c => c.ClaimType == ClaimTypes.AuthenticationMethod && c.ClaimValue == Claims.CanAccessExternalArea); Assert.True(claimCount == 1, "A single \"CanAccessExterna;Area\" claim was not issued to the user."); }
public SchemeMemberSubmissionEventHandler(IWeeeEmailService weeeEmailService) { this.weeeEmailService = weeeEmailService; }
public SendTestEmailHandler(IWeeeAuthorization authorization, IWeeeEmailService weeeEmailService) { this.authorization = authorization; this.weeeEmailService = weeeEmailService; }
public ContactDetailsUpdateEventHandlerTests() { emailService = A.Fake <IWeeeEmailService>(); handler = new ContactDetailsUpdateEventHandler(this.emailService); }
public ContactDetailsUpdateEventHandler(IWeeeEmailService emailService) { this.emailService = emailService; }
public OrganisationUserRequestCompletedEventHandler(IOrganisationUserRequestEventHandlerDataAccess dataAccess, IWeeeEmailService emailService) { this.emailService = emailService; this.dataAccess = dataAccess; }