Search in sources :

Example 1 with InvitationVerificationRequest

use of org.pmiops.workbench.model.InvitationVerificationRequest in project workbench by all-of-us.

the class ProfileControllerTest method setUp.

@Before
public void setUp() {
    WorkbenchConfig config = new WorkbenchConfig();
    config.firecloud = new FireCloudConfig();
    config.firecloud.billingProjectPrefix = BILLING_PROJECT_PREFIX;
    WorkbenchEnvironment environment = new WorkbenchEnvironment(true, "appId");
    WorkbenchEnvironment cloudEnvironment = new WorkbenchEnvironment(false, "appId");
    createAccountRequest = new CreateAccountRequest();
    invitationVerificationRequest = new InvitationVerificationRequest();
    Profile profile = new Profile();
    profile.setContactEmail(CONTACT_EMAIL);
    profile.setFamilyName(FAMILY_NAME);
    profile.setGivenName(GIVEN_NAME);
    profile.setUsername(USERNAME);
    createAccountRequest.setProfile(profile);
    createAccountRequest.setInvitationKey(INVITATION_KEY);
    createAccountRequest.setPassword(PASSWORD);
    invitationVerificationRequest.setInvitationKey(INVITATION_KEY);
    googleUser = new com.google.api.services.admin.directory.model.User();
    googleUser.setPrimaryEmail(PRIMARY_EMAIL);
    clock = new FakeClock(NOW);
    idVerificationRequest = new IdVerificationRequest();
    idVerificationRequest.setFirstName("Bob");
    UserService userService = new UserService(userProvider, userDao, adminActionHistoryDao, clock, fireCloudService, configProvider);
    ProfileService profileService = new ProfileService(fireCloudService, mailChimpService, userDao);
    this.profileController = new ProfileController(profileService, userProvider, userAuthenticationProvider, userDao, clock, userService, fireCloudService, directoryService, cloudStorageService, blockscoreService, mailChimpService, Providers.of(config), environment);
    this.cloudProfileController = new ProfileController(profileService, userProvider, userAuthenticationProvider, userDao, clock, userService, fireCloudService, directoryService, cloudStorageService, blockscoreService, mailChimpService, Providers.of(config), cloudEnvironment);
}
Also used : WorkbenchConfig(org.pmiops.workbench.config.WorkbenchConfig) FireCloudConfig(org.pmiops.workbench.config.WorkbenchConfig.FireCloudConfig) UserService(org.pmiops.workbench.db.dao.UserService) FakeClock(org.pmiops.workbench.test.FakeClock) InvitationVerificationRequest(org.pmiops.workbench.model.InvitationVerificationRequest) Profile(org.pmiops.workbench.model.Profile) CreateAccountRequest(org.pmiops.workbench.model.CreateAccountRequest) ProfileService(org.pmiops.workbench.auth.ProfileService) IdVerificationRequest(org.pmiops.workbench.model.IdVerificationRequest) WorkbenchEnvironment(org.pmiops.workbench.config.WorkbenchEnvironment) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ProfileService (org.pmiops.workbench.auth.ProfileService)1 WorkbenchConfig (org.pmiops.workbench.config.WorkbenchConfig)1 FireCloudConfig (org.pmiops.workbench.config.WorkbenchConfig.FireCloudConfig)1 WorkbenchEnvironment (org.pmiops.workbench.config.WorkbenchEnvironment)1 UserService (org.pmiops.workbench.db.dao.UserService)1 CreateAccountRequest (org.pmiops.workbench.model.CreateAccountRequest)1 IdVerificationRequest (org.pmiops.workbench.model.IdVerificationRequest)1 InvitationVerificationRequest (org.pmiops.workbench.model.InvitationVerificationRequest)1 Profile (org.pmiops.workbench.model.Profile)1 FakeClock (org.pmiops.workbench.test.FakeClock)1