Search in sources :

Example 1 with TestBean

use of core.framework.test.inject.TestBean in project core-ng-project by neowu.

the class TestModule method initialize.

@Override
protected void initialize() {
    loadProperties("test.properties");
    // in test context, override binding is defined before actual binding
    overrideBinding(HTTPClient.class, Mockito.mock(HTTPClient.class));
    bind(HTTPClient.class, new HTTPClientBuilder().build());
    configureDB();
    configureMongo();
    configureSearch();
    configureKafka();
    redis().host("localhost");
    log().writeToConsole();
    site().session().redis("localhost");
    configureHTTP();
    bind(new TestBean(requiredProperty("test.inject-test.property")));
}
Also used : TestBean(core.framework.test.inject.TestBean) HTTPClientBuilder(core.framework.http.HTTPClientBuilder) HTTPClient(core.framework.http.HTTPClient)

Aggregations

HTTPClient (core.framework.http.HTTPClient)1 HTTPClientBuilder (core.framework.http.HTTPClientBuilder)1 TestBean (core.framework.test.inject.TestBean)1