Search in sources :

Example 1 with MockPaymentControlProviderPlugin

use of org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin in project killbill by killbill.

the class TestPayment method beforeMethod.

@BeforeMethod(groups = "slow")
public void beforeMethod() throws Exception {
    super.beforeMethod();
    mockPaymentProviderPlugin = (MockPaymentProviderPlugin) registry.getServiceForName(PLUGIN_NAME);
    mockPaymentControlProviderPlugin = new MockPaymentControlProviderPlugin();
    controlPluginRegistry.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;
        }
    }, mockPaymentControlProviderPlugin);
}
Also used : OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor) MockPaymentControlProviderPlugin(org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with MockPaymentControlProviderPlugin

use of org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin in project killbill by killbill.

the class TestPaymentApi method beforeMethod.

@BeforeMethod(groups = "slow")
public void beforeMethod() throws Exception {
    super.beforeMethod();
    mockPaymentProviderPlugin.clear();
    account = testHelper.createTestAccount("bobo@gmail.com", true);
    mockPaymentControlProviderPlugin = new MockPaymentControlProviderPlugin();
    controlPluginRegistry.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;
        }
    }, mockPaymentControlProviderPlugin);
}
Also used : OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor) MockPaymentControlProviderPlugin(org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with MockPaymentControlProviderPlugin

use of org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin in project killbill by killbill.

the class TestDefaultAdminPaymentApi method beforeMethod.

@BeforeMethod(groups = "slow")
public void beforeMethod() throws Exception {
    super.beforeMethod();
    mockPaymentProviderPlugin.clear();
    account = testHelper.createTestAccount("bobo@gmail.com", true);
    final PaymentControlPluginApi mockPaymentControlProviderPlugin = new MockPaymentControlProviderPlugin();
    controlPluginRegistry.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;
        }
    }, mockPaymentControlProviderPlugin);
}
Also used : PaymentControlPluginApi(org.killbill.billing.control.plugin.api.PaymentControlPluginApi) OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor) MockPaymentControlProviderPlugin(org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

OSGIServiceDescriptor (org.killbill.billing.osgi.api.OSGIServiceDescriptor)3 MockPaymentControlProviderPlugin (org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin)3 BeforeMethod (org.testng.annotations.BeforeMethod)3 PaymentControlPluginApi (org.killbill.billing.control.plugin.api.PaymentControlPluginApi)1