Exemplo n.º 1
0
 public static User GenerateRandomUser()
 {
     // Create new user, random test data
     return(new User
     {
         FullName = UserRandomizer.GetRandomNames(),           // "John Doe"
         SocialSecurityNumber = UserRandomizer.GetRandomSSN(), // "123-45-6789"
         CreditCardNumber = UserRandomizer.GetRandomCC(),      //  "1234 5678 9012 3456"
         FacePhoto = UserRandomizer.GetRandomBytes()           // 0x123456789 ..
     });
 }
        private User CreateRandomUser()
        {
            var rndUser = new User
            {
                OrderId      = 0, //db overwrites this
                OrderItem    = UserRandomizer.GetRandomItem(),
                CustomerName = UserRandomizer.GetRandomNames(),
                Timestamp    = Randomizer.GetRandomTime(),
                SecureSearch_CreditCardNumber = UserRandomizer.GetRandomCC(),
                Secure_LegacyPIN            = UserRandomizer.GetRandomPIN(),
                Secure_SocialSecurityNumber = Encoding.UTF8.GetBytes(UserRandomizer.GetRandomSSN())
            };

            return(rndUser);
        }