use of com.stanfy.enroscar.net.EnroscarConnectionsEngine.Config in project enroscar by stanfy.
the class AbstractMockServerTest method whenBeansConfigured.
@Override
protected void whenBeansConfigured() {
super.whenBeansConfigured();
BeansManager.get(getApplication()).getContainer().getBean(RemoteServerApiConfiguration.class).setDefaultRequestMethod(new RequestMethod() {
@Override
protected void before(final Context systemContext, final RequestDescription description) {
// do not use TrafficStats
}
@Override
protected void after(final Context systemContext, final RequestDescription description) {
// do not use TrafficStats
}
});
if (config == null) {
config = BeanUtils.getAnnotationFromHierarchy(getClass(), EnroscarNetConfig.class);
}
if (config != null && config.connectionEngineRequired()) {
final Config config = EnroscarConnectionsEngine.config();
configureConnectionsEngine(config);
config.treatFileScheme(false);
config.setup(Robolectric.application);
}
configureServiceBind();
}
Aggregations