Package net.andreinc.mockneat.unit.user
Class Emails
java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.user.Emails
- All Implemented Interfaces:
MockUnit<java.lang.String>,MockUnitString
public class Emails extends MockUnitBase implements MockUnitString
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description MockUnit<java.lang.String>domain(java.lang.String domain)Generates a newMockUnitStringthat can be used to generate emails that have a specific domain (eg.: "gmail.com").MockUnit<java.lang.String>domains(java.lang.String... domains)Generates a newMockUnitStringthat can be used to generate emails that have specific domains (eg.: "gmail.com").static Emailsemails()Returns anEmailobject that can be used to generate arbitrary email address.java.util.function.Supplier<java.lang.String>supplier()This is the sole abstract method of the interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnit
array, array, collection, collection, collection, collection, collection, collection, consume, consume, get, get, list, list, list, list, list, list, map, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapToDouble, mapToInt, mapToLocalDate, mapToLong, mapToString, mapToString, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, serialize, set, set, set, set, set, set, stream, val, val, valStr, valStrMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnitString
accumulate, append, array, base64, escapeCsv, escapeEcmaScript, escapeHtml, escapeXml, format, md2, md5, noSpecialChars, prepend, replace, replace, replaceAll, replaceFirst, sha1, sha256, sha384, sha512, split, split, sub, sub, urlEncode, urlEncode
-
Constructor Details
-
Method Details
-
emails
Returns an
Emailobject that can be used to generate arbitrary email address.- Returns:
- A re-usable
Emailsobject. TheEmailsclass implementsMockUnitString.
-
supplier
public java.util.function.Supplier<java.lang.String> supplier()Description copied from interface:MockUnitThis is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented. -
domains
Generates a new
MockUnitStringthat can be used to generate emails that have specific domains (eg.: "gmail.com").This is particularly useful when the requirement is to generate "company/enterprise" emails.
- Parameters:
domains- A var-arg String array containing the list of the domains to be used.- Returns:
- A new
MockUnitString.
-
domain
Generates a new
MockUnitStringthat can be used to generate emails that have a specific domain (eg.: "gmail.com").This is particularly useful when the requirement is to generate "company/enterprise" emails.
- Parameters:
domain- The domain to be used.- Returns:
- A new
MockUnitString.
-