use of com.stanfy.enroscar.beans.BeansManager in project enroscar by stanfy.
the class CacheSwitcherTest method setupCache.
@Before
public void setupCache() throws IOException {
final BeansManager beansManager = BeansManager.get(Robolectric.application);
cache1 = (SimpleFileCache) beansManager.getContainer().getBean("testCache1", SimpleFileCache.class);
cache2 = (SimpleFileCache) beansManager.getContainer().getBean("testCache2", SimpleFileCache.class);
}
use of com.stanfy.enroscar.beans.BeansManager 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");
}
Aggregations