private void CreateUserWithRole(string accountRole) { var accountId = (long)ScenarioContext.Current["AccountId"]; Role roleOut; Enum.TryParse(accountRole, out roleOut); var signInModel = new UserViewModel { Email = "*****@*****.**" + Guid.NewGuid().ToString().Substring(0, 6), FirstName = "test", LastName = "tester", UserId = _externalUserId }; var userCreation = new UserSteps(); userCreation.UpsertUser(signInModel); userCreation.CreateUserWithRole( new User { Email = signInModel.Email, FirstName = signInModel.FirstName, LastName = signInModel.LastName, UserRef = _externalUserId }, roleOut, accountId); }
private void CreateAccountWithOwner() { var accountOwnerUserId = Guid.NewGuid().ToString(); ScenarioContext.Current["AccountOwnerUserId"] = accountOwnerUserId; var signInUserModel = new UserViewModel { UserId = accountOwnerUserId, Email = "*****@*****.**" + Guid.NewGuid().ToString().Substring(0, 6), FirstName = "Test", LastName = "Tester" }; var userCreationSteps = new UserSteps(); userCreationSteps.UpsertUser(signInUserModel); var user = userCreationSteps.GetExistingUserAccount(); CreateDasAccount(user, _container.GetInstance <EmployerAccountOrchestrator>()); }