Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Generate a random string
- private static string getRandomString(Integer len) {
- final string chars = 'abcdefghijklmnopqrstuvwxyz';
- string out = '';
- while (out.length() < len) {
- Integer idx = Math.mod(Math.abs(Crypto.getRandomInteger()), chars.length());
- out += chars.substring(idx, idx+1);
- }
- return out;
- }
- List<Account> acctList = new List<Account> {
- // Dummy account
- new Account(Name='DO NOT DELETE', Email='test' + getRandomString(5) + @mailinator.com')
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement