Search in sources :

Example 1 with StandalonePluginCatalog

use of org.killbill.billing.catalog.plugin.api.StandalonePluginCatalog in project killbill by killbill.

the class TestCatalogPluginMapping method testMappingFromExistingCatalog.

@Test(groups = "fast")
public void testMappingFromExistingCatalog() throws Exception {
    final StandaloneCatalog inputCatalog = XMLLoader.getObjectFromString(Resources.getResource("SpyCarAdvanced.xml").toExternalForm(), StandaloneCatalog.class);
    final StandalonePluginCatalog pluginCatalog = buildStandalonePluginCatalog(inputCatalog);
    final StandaloneCatalogMapper mapper = new StandaloneCatalogMapper(inputCatalog.getCatalogName(), inputCatalog.getRecurringBillingMode());
    final StandaloneCatalog output = mapper.toStandaloneCatalog(pluginCatalog, inputCatalog.getCatalogURI());
    Assert.assertEquals(output, inputCatalog);
}
Also used : StandalonePluginCatalog(org.killbill.billing.catalog.plugin.api.StandalonePluginCatalog) StandaloneCatalog(org.killbill.billing.catalog.StandaloneCatalog) Test(org.testng.annotations.Test)

Aggregations

StandaloneCatalog (org.killbill.billing.catalog.StandaloneCatalog)1 StandalonePluginCatalog (org.killbill.billing.catalog.plugin.api.StandalonePluginCatalog)1 Test (org.testng.annotations.Test)1