use of org.elasticsearch.common.inject.Injector in project crate by crate.
the class TestGlobalSysExpressions method prepare.
@Before
public void prepare() throws Exception {
Injector injector = new ModulesBuilder().add(new SysClusterExpressionModule()).add((Module) binder -> {
binder.bind(ClusterService.class).toInstance(new NoopClusterService());
binder.bind(Settings.class).toInstance(Settings.EMPTY);
binder.bind(ClusterName.class).toInstance(new ClusterName("cluster"));
binder.bind(ClusterReferenceResolver.class).asEagerSingleton();
}).createInjector();
resolver = injector.getInstance(ClusterReferenceResolver.class);
}
Aggregations