use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.
the class TestRetryablePayment method beforeClass.
@BeforeClass(groups = "fast")
public void beforeClass() throws Exception {
super.beforeClass();
account = testHelper.createTestAccount("lolo@gmail.com", false);
Mockito.when(accountInternalApi.getAccountById(Mockito.<UUID>any(), Mockito.<InternalTenantContext>any())).thenReturn(account);
//Mockito.when(nonEntityDao.retrieveIdFromObject(Mockito.<Long>any(), Mockito.<ObjectType>any())).thenReturn(uuid);
retryPluginRegistry.registerService(new OSGIServiceDescriptor() {
@Override
public String getPluginSymbolicName() {
return null;
}
@Override
public String getPluginName() {
return MockPaymentControlProviderPlugin.PLUGIN_NAME;
}
@Override
public String getRegistrationName() {
return MockPaymentControlProviderPlugin.PLUGIN_NAME;
}
}, mockRetryProviderPlugin);
EMPTY_PROPERTIES = PluginPropertySerializer.serialize(ImmutableList.<PluginProperty>of());
}
use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.
the class TestPaymentGatewayApiWithPaymentControl method beforeMethod.
@BeforeMethod(groups = "fast")
public void beforeMethod() throws Exception {
super.beforeMethod();
account = testHelper.createTestAccount("arthur@gmail.com", true);
paymentOptions = new PaymentOptions() {
@Override
public boolean isExternalPayment() {
return false;
}
@Override
public List<String> getPaymentControlPluginNames() {
return ImmutableList.of(TestPaymentGatewayApiControlPlugin.PLUGIN_NAME, TestPaymentGatewayApiValidationPlugin.VALIDATION_PLUGIN_NAME);
}
};
plugin = new TestPaymentGatewayApiControlPlugin();
controlPluginRegistry.registerService(new OSGIServiceDescriptor() {
@Override
public String getPluginSymbolicName() {
return null;
}
@Override
public String getPluginName() {
return TestPaymentGatewayApiControlPlugin.PLUGIN_NAME;
}
@Override
public String getRegistrationName() {
return TestPaymentGatewayApiControlPlugin.PLUGIN_NAME;
}
}, plugin);
validationPlugin = new TestPaymentGatewayApiValidationPlugin();
controlPluginRegistry.registerService(new OSGIServiceDescriptor() {
@Override
public String getPluginSymbolicName() {
return null;
}
@Override
public String getPluginName() {
return TestPaymentGatewayApiValidationPlugin.VALIDATION_PLUGIN_NAME;
}
@Override
public String getRegistrationName() {
return TestPaymentGatewayApiValidationPlugin.VALIDATION_PLUGIN_NAME;
}
}, validationPlugin);
}
use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.
the class MockPaymentProviderPluginProvider method get.
@Override
public MockPaymentProviderPlugin get() {
final MockPaymentProviderPlugin plugin = new MockPaymentProviderPlugin(clock);
final OSGIServiceDescriptor desc = new OSGIServiceDescriptor() {
@Override
public String getPluginSymbolicName() {
return null;
}
@Override
public String getPluginName() {
return instanceName;
}
@Override
public String getRegistrationName() {
return instanceName;
}
};
registry.registerService(desc, plugin);
return plugin;
}
use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.
the class TestPaymentApiWithControl method beforeMethod.
@BeforeMethod(groups = "slow")
public void beforeMethod() throws Exception {
super.beforeMethod();
account = testHelper.createTestAccount("bobo@gmail.com", true);
testPaymentControlPluginApi = new TestPaymentControlPluginApi();
controlPluginRegistry.registerService(new OSGIServiceDescriptor() {
@Override
public String getPluginSymbolicName() {
return null;
}
@Override
public String getPluginName() {
return TestPaymentControlPluginApi.PLUGIN_NAME;
}
@Override
public String getRegistrationName() {
return TestPaymentControlPluginApi.PLUGIN_NAME;
}
}, testPaymentControlPluginApi);
}
use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.
the class TestWithCatalogPlugin method beforeClass.
@BeforeClass(groups = "slow")
public void beforeClass() throws Exception {
super.beforeClass();
this.testCatalogPluginApi = new TestCatalogPluginApi(priceOverride, internalCallContext, internalCallContextFactory);
pluginRegistry.registerService(new OSGIServiceDescriptor() {
@Override
public String getPluginSymbolicName() {
return "TestCatalogPluginApi";
}
@Override
public String getPluginName() {
return "TestCatalogPluginApi";
}
@Override
public String getRegistrationName() {
return "TestCatalogPluginApi";
}
}, testCatalogPluginApi);
}
Aggregations