public NewUser(DMIUser dmiuser) { this.firstName = (dmiuser.firstname != null) ? dmiuser.firstname : GenerateRandom.StringOfLength(5); this.lastName = (dmiuser.lastname != null) ? dmiuser.lastname : GenerateRandom.StringOfLength(5); this.username = (dmiuser.username != null) ? dmiuser.username : GenerateRandom.StringOfLength(5); this.password = (dmiuser.password != null) ? dmiuser.password : "******"; this.email = (dmiuser.email != null) ? dmiuser.email : Config.Environment.Email; }
public static NewUser GenerateUserWithUsername(string username) { NewUser newuser = new NewUser(); newuser.email = Config.Environment.Email; newuser.username = username; newuser.firstName = GenerateRandom.StringOfLength(5); newuser.lastName = GenerateRandom.StringOfLength(5); newuser.password = "******"; return(newuser); }
public static NewUser GenerateRandomUser() { NewUser newuser = new NewUser(); newuser.email = "*****@*****.**"; newuser.username = "******" + GenerateRandom.StringOfLength(8); newuser.firstName = GenerateRandom.StringOfLength(5); newuser.lastName = GenerateRandom.StringOfLength(5); newuser.password = "******"; return(newuser); }