Class MockFieldsSupport

java.lang.Object
ru.vyarus.dropwizard.guice.test.jupiter.env.field.AnnotatedTestFieldSetup<MockBean,Object>
ru.vyarus.dropwizard.guice.test.jupiter.ext.mock.MockFieldsSupport
All Implemented Interfaces:
TestExecutionListener, TestEnvironmentSetup

public class MockFieldsSupport extends AnnotatedTestFieldSetup<MockBean,Object>
MockBean test fields support implementation.

Annotated fields resolved in time of guicey extension initialization (beforeAll or beforeEach). Register override bindings for provided mock instances (manual or created automatically). See debug report to be sure what value was actually used: manual or automatic (field might be assigned too late).

In beforeAll injects static values, in beforeEach inject both (in case if beforeAll wasn't called). Calls mocks reset after each test.

Since:
10.02.2025