Annotation Type Seed
Specifies the seed for the random number generator.
Example:
@ExtendWith(InstancioExtension.class)
class ExampleTest {
@Test
@Seed(12345)
void someTestMethod() {
Person person = Instancio.create(Person.class); // will use the specified seed
}
}
If the Seed annotation is specified, the same data set will be generated each test run
based on the given seed value.
If the seed annotation is not specified, a random seed will be used, resulting in random data generated on each test run.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionlongSpecifies seed value for the Random Number Generator.
-
Element Details
-
value
long valueSpecifies seed value for the Random Number Generator.- Returns:
- seed value
-