public MaintainAdministratorsController(IUserAccountsCommand userAccountsCommand, ILoginCredentialsCommand loginCredentialsCommand, ILoginCredentialsQuery loginCredentialsQuery, IAdministratorAccountsCommand administratorAccountsCommand, IAdministratorsQuery administratorsQuery) { _userAccountsCommand = userAccountsCommand; _loginCredentialsCommand = loginCredentialsCommand; _loginCredentialsQuery = loginCredentialsQuery; _administratorAccountsCommand = administratorAccountsCommand; _administratorsQuery = administratorsQuery; }
public static Administrator CreateTestAdministrator(this IAdministratorAccountsCommand administratorAccountsCommand, string loginId, string firstName, string lastName) { var administrator = new Administrator { EmailAddress = new EmailAddress { Address = string.Format(EmailAddressFormat, loginId) }, FirstName = firstName, LastName = lastName, }; administratorAccountsCommand.CreateAdministrator(administrator, new LoginCredentials { LoginId = loginId, PasswordHash = LoginCredentials.HashToString(DefaultPassword) }); return(administrator); }
public static Administrator CreateTestAdministrator(this IAdministratorAccountsCommand administratorAccountsCommand, string loginId) { return(administratorAccountsCommand.CreateTestAdministrator(loginId, string.Format(FirstNameFormat, 0), string.Format(LastNameFormat, 0))); }
public static Administrator CreateTestAdministrator(this IAdministratorAccountsCommand administratorAccountsCommand, int index) { return(administratorAccountsCommand.CreateTestAdministrator(string.Format(UserIdFormat, index), string.Format(FirstNameFormat, index), string.Format(LastNameFormat, index))); }