use of com.stanfy.enroscar.rest.RemoteServerApiConfiguration 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");
}
use of com.stanfy.enroscar.rest.RemoteServerApiConfiguration in project enroscar by stanfy.
the class RemoteServerApiConfigurationTest method badCacheBeanNameShouldThrow.
@Test(expected = IllegalArgumentException.class)
public void badCacheBeanNameShouldThrow() {
RemoteServerApiConfiguration config = BeansManager.get(Robolectric.application).getContainer().getBean(RemoteServerApiConfiguration.class);
config.setDefaultCacheBeanName("bad");
}
use of com.stanfy.enroscar.rest.RemoteServerApiConfiguration in project enroscar by stanfy.
the class RemoteServerApiConfigurationTest method badContentHandlerBeanNameShouldThrow.
@Test(expected = IllegalArgumentException.class)
public void badContentHandlerBeanNameShouldThrow() {
RemoteServerApiConfiguration config = BeansManager.get(Robolectric.application).getContainer().getBean(RemoteServerApiConfiguration.class);
config.setDefaultContentHandlerName("bad");
}
Aggregations