Skip to content

Integration Test using mocked beans #92

@sandeep-chekuri

Description

@sandeep-chekuri

We have a following scenario,
OurServiceApplication is adding the below bundle during the initialize(Bootstrap...)
GuiceBundle guiceBundle = GuiceBundle.newBuilder()
.addModule(new OurModule())...

OurModule has the bean injection of DatabaseSource etc.

We are writing the integration test as below
DropwizardAppRule RULE = new DropwizardAppRule<>(
OurServiceApplication.class, "our.yml")

Now we want to inject in-memory datasource, can u pls let us know how to inject it?
Please note that TestModule has the InMemoryDatasource beans..

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