use of org.killbill.billing.util.config.definition.CatalogConfig in project killbill by killbill.
the class TestCatalogService method testCatalogServiceDirectory.
@Test(groups = "fast")
public void testCatalogServiceDirectory() throws ServiceException, CatalogApiException {
final DefaultCatalogService service = new DefaultCatalogService(new CatalogConfig() {
@Override
public String getCatalogURI() {
return "versionedCatalog";
}
}, tenantInternalApi, catalogCache, cacheInvalidationCallback);
service.loadCatalog();
Assert.assertNotNull(service.getFullCatalog(true, true, internalCallContext));
Assert.assertEquals(service.getFullCatalog(true, true, internalCallContext).getCatalogName(), "WeaponsHireSmall");
}
use of org.killbill.billing.util.config.definition.CatalogConfig in project killbill by killbill.
the class TestCatalogService method testCatalogServiceFile.
@Test(groups = "fast")
public void testCatalogServiceFile() throws ServiceException, CatalogApiException {
final DefaultCatalogService service = new DefaultCatalogService(new CatalogConfig() {
@Override
public String getCatalogURI() {
return "WeaponsHire.xml";
}
}, tenantInternalApi, catalogCache, cacheInvalidationCallback);
service.loadCatalog();
Assert.assertNotNull(service.getFullCatalog(true, true, internalCallContext));
Assert.assertEquals(service.getFullCatalog(true, true, internalCallContext).getCatalogName(), "Firearms");
}
use of org.killbill.billing.util.config.definition.CatalogConfig in project killbill by killbill.
the class CatalogModule method installConfig.
protected void installConfig() {
final CatalogConfig config = new ConfigurationObjectFactory(skifeConfigSource).build(CatalogConfig.class);
bind(CatalogConfig.class).toInstance(config);
}
Aggregations