Skip to content

How to access faker instance in custom factories? #101

@milgner

Description

@milgner

When not explicitly adding any factory {} block and just trying to call fixture<MyEntity>(), I get "Unable to resolve class".

Now I have started adding factory {} blocks and wonder how to best access the Java Faker instance? Right now I just decided to use Faker.instance() - but I'm not sure whether that is correct and takes the leading javaFakerStrategy {} block into consideration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions