コード例 #1
0
 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;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }