Package org.instancio.junit
Annotation Type WithSettings
-
@Documented @Target(FIELD) @Retention(RUNTIME) public @interface WithSettings
An annotation for supplying custom settings to a unit test.This annotation must be placed on a
Settings
fields. There can be at most one field annotated@WithSettings
per test class.@ExtendWith(InstancioExtension.class) class ExampleTest { @WithSettings private final Settings settings = Settings.create() .set(Setting.COLLECTION_MIN_SIZE, 50) .set(Setting.COLLECTION_MAX_SIZE, 100); }