private static List <User> CreateUsers(int amountOfUsers, string firstName, TestType testType) { var users = new List <User>(); for (var i = 0; i < amountOfUsers; i++) { var number = i + 1; var lastName = EjudUserData.LAST_NAME(number); var displayName = EjudUserData.DISPLAY_NAME(firstName, lastName); var username = EjudUserData.USERNAME(firstName, lastName, DOMAIN); var contactEmail = EjudUserData.CONTACT_EMAIL(firstName, lastName, DOMAIN); users.Add(new User { Application = Application.Ejud, ContactEmail = contactEmail, CreatedDate = DateTime.UtcNow, DisplayName = displayName, FirstName = firstName, IsProdUser = false, LastName = lastName, Number = number, TestType = testType, Username = username, UserType = UserType.Judge }); } return(users); }
public UserDto BuildUserDto() { var firstName = SetFirstName(); var lastName = EjudUserData.LAST_NAME(_number); var displayName = EjudUserData.DISPLAY_NAME(firstName, lastName); var contactEmail = EjudUserData.CONTACT_EMAIL(firstName, lastName, _emailStem); var username = EjudUserData.USERNAME(firstName, lastName, _emailStem); return(new UserDto() { Application = Application.Ejud, ContactEmail = contactEmail, CreatedDate = DateTime.UtcNow, DisplayName = displayName, FirstName = firstName, IsProdUser = false, LastName = lastName, Number = _number, TestType = _testType, Username = username, UserType = _userType }); }