use of org.killbill.billing.subscription.catalog.DefaultSubscriptionCatalogApi in project killbill by killbill.
the class TestDefaultSubscriptionTransferApi method beforeMethod.
@Override
@BeforeMethod(groups = "fast")
public void beforeMethod() throws Exception {
super.beforeMethod();
final SubscriptionDao dao = Mockito.mock(SubscriptionDao.class);
final DefaultVersionedCatalog versionedCatalog = new DefaultVersionedCatalog();
final MockCatalog mockCatalog = new MockCatalog();
versionedCatalog.add(mockCatalog);
final CatalogService catalogService = new MockCatalogService(versionedCatalog);
final CatalogInternalApi catalogInternalApiWithMockCatalogService = new DefaultCatalogInternalApi(catalogService);
final SubscriptionCatalogApi subscriptionCatalogInternalApiWithMockCatalogService = new DefaultSubscriptionCatalogApi(catalogInternalApiWithMockCatalogService, clock);
final SubscriptionBaseApiService apiService = Mockito.mock(SubscriptionBaseApiService.class);
final SubscriptionBaseTimelineApi timelineApi = Mockito.mock(SubscriptionBaseTimelineApi.class);
transferApi = new DefaultSubscriptionBaseTransferApi(clock, dao, timelineApi, subscriptionCatalogInternalApiWithMockCatalogService, subscriptionInternalApi, apiService, internalCallContextFactory);
// Overrride catalog with our MockCatalog
this.catalog = DefaultSubscriptionCatalogApi.wrapCatalog(versionedCatalog, clock);
}
Aggregations