public void WhenAUserIsAdded(string userName) { Try(() => { IUserListItem userListItem = IdentityManagementService.CreateUser(userName); nameIdentifierPairs.Add(userName, userListItem.Id); }); }
private void CreateUser(string userName, Table customPropertiesTable) { List <KeyValuePair <string, string> > customProperties = customPropertiesTable.Rows .Select(row => new KeyValuePair <string, string>(row["Name"], row["Value"])) .ToList(); IUserListItem userListItem = IdentityManagementService.CreateUser(userName, customProperties); nameIdentifierPairs.Add(userName, userListItem.Id); }
public void WhenAUserWithNoNameIsAdded() { Try(() => IdentityManagementService.CreateUser(string.Empty)); }