Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasYOY committed Aug 9, 2022
1 parent e034c16 commit b542565
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/randomBeans.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This extension is engaged by adding the `@Random` annotation to a test class fie
- `size`: for collection types, the size of the generated collection
- `type`: for collection types, the underlying type of a generic collection

You can use `@Random` annotation to a `static` field.
From **v2.6.0** `static` field will be populated only once. Note, that in case of any default value (except `null`) the value will not be overridden by the extension.

#### Examples

###### Test Class Fields
Expand All @@ -23,6 +26,8 @@ public class MyTest {
// injected with a random String
@Random private String anyString;
@Random private static String anyStaticString;
// injected with a random, fully populated instance of DomainObject
@Random private DomainObject fullyPopulatedDomainObject;
Expand Down

0 comments on commit b542565

Please sign in to comment.