...
StubFactory can generate:
primitives (boolean, short, int and so on)
string
list
map
complex object e.g. Person (name, age, birthday...)
StubFactory works recursively, so it can generate collections with other nested types e.g. List<Map<List<Integer>, String>> and so on.
...
To generate API layer without StubFactory (usual interfaces) use the following command from the project's root directory:
Code Blockinfo |
---|
cmd/app generate api |
To generate API layer with StubFactory usage (default method with StubFactory in interfaces) use the following command from the project's root directory:
Code Blockinfo |
---|
cmd/app generate api-stub |
...
Basically, StubFactory generates random appropriate data, but it also is able to generate meaningful data using MockDataGenerator.
Meaningful data provided by MockDataGenerator is listed below:
name (first name + last name) / last name
phone number
email
address
date
datetime
text (like Lorem Ipsum)
Also, MockDataGenerator supports different locales.
...