Search in sources :

Example 1 with DummyResponseCache

use of com.stanfy.enroscar.net.test.cache.DummyResponseCache in project enroscar by stanfy.

the class RemoteServerApiConfigurationTest method configureBean.

@Before
public void configureBean() {
    BeansManager manager = BeansManager.get(Robolectric.application);
    manager.edit().put("defaultCacheBeanName", new DummyResponseCache()).put("defaultContentHandlerName", new StringContentHandler(Robolectric.application)).put(RemoteServerApiConfiguration.class).commit();
    RemoteServerApiConfiguration config = manager.getContainer().getBean(RemoteServerApiConfiguration.class);
    config.setDefaultCacheBeanName("defaultCacheBeanName");
    config.setDefaultContentHandlerName("defaultContentHandlerName");
}
Also used : BeansManager(com.stanfy.enroscar.beans.BeansManager) StringContentHandler(com.stanfy.enroscar.rest.response.handler.StringContentHandler) RemoteServerApiConfiguration(com.stanfy.enroscar.rest.RemoteServerApiConfiguration) DummyResponseCache(com.stanfy.enroscar.net.test.cache.DummyResponseCache) Before(org.junit.Before)

Aggregations

BeansManager (com.stanfy.enroscar.beans.BeansManager)1 DummyResponseCache (com.stanfy.enroscar.net.test.cache.DummyResponseCache)1 RemoteServerApiConfiguration (com.stanfy.enroscar.rest.RemoteServerApiConfiguration)1 StringContentHandler (com.stanfy.enroscar.rest.response.handler.StringContentHandler)1 Before (org.junit.Before)1