All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mstream.trader.commons.test.guice.AbstractTestInjector Maven / Gradle / Ivy

There is a newer version: 1.14
Show newest version
package io.mstream.trader.commons.test.guice;


import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Stage;
import cucumber.api.guice.CucumberModules;
import cucumber.runtime.java.guice.InjectorSource;

import static com.google.inject.Guice.createInjector;

public abstract class AbstractTestInjector implements InjectorSource {

    private final Module testModule;

    protected AbstractTestInjector(Module testModule) {
        this.testModule = testModule;
    }

    @Override
    public Injector getInjector() {
        return createInjector(
                Stage.PRODUCTION,
                CucumberModules.SCENARIO,
                new CommonsModule(),
                testModule
        );
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy