use of org.killbill.billing.catalog.api.CatalogService in project killbill by killbill.
the class TestDefaultSubscriptionTransferApi method beforeMethod.
@Override
@BeforeMethod(groups = "fast")
public void beforeMethod() throws Exception {
super.beforeMethod();
final NonEntityDao nonEntityDao = Mockito.mock(NonEntityDao.class);
final SubscriptionDao dao = Mockito.mock(SubscriptionDao.class);
final CatalogService catalogService = new MockCatalogService(new MockCatalog(), cacheControllerDispatcher);
final SubscriptionBaseApiService apiService = Mockito.mock(SubscriptionBaseApiService.class);
final SubscriptionBaseTimelineApi timelineApi = Mockito.mock(SubscriptionBaseTimelineApi.class);
transferApi = new DefaultSubscriptionBaseTransferApi(clock, dao, timelineApi, catalogService, apiService, internalCallContextFactory);
}
use of org.killbill.billing.catalog.api.CatalogService in project killbill by killbill.
the class MockCatalogModule method configure.
@Override
protected void configure() {
final Catalog catalog = Mockito.mock(Catalog.class);
final CatalogService catalogService = Mockito.mock(CatalogService.class);
try {
Mockito.when(catalogService.getCurrentCatalog(Mockito.any(Boolean.class), Mockito.any(Boolean.class), Mockito.any(InternalCallContext.class))).thenReturn(new MockCatalog());
Mockito.when(catalogService.getFullCatalog(Mockito.any(Boolean.class), Mockito.any(Boolean.class), Mockito.any(InternalCallContext.class))).thenReturn(catalog);
bind(CatalogService.class).toInstance(catalogService);
} catch (CatalogApiException e) {
throw new RuntimeException(e);
}
}
Aggregations