Search in sources :

Example 1 with KillbillConfigSource

use of org.killbill.billing.platform.api.KillbillConfigSource in project killbill by killbill.

the class TestJaxrsBase method beforeSuite.

@BeforeSuite(groups = "slow")
public void beforeSuite() throws Exception {
    if (hasFailed()) {
        return;
    }
    super.beforeSuite();
    // We need to setup these earlier than other tests because the server is started once in @BeforeSuite
    final KillbillConfigSource configSource = getConfigSource(extraPropertiesForTestSuite);
    final ConfigSource skifeConfigSource = new ConfigSource() {

        @Override
        public String getString(final String propertyName) {
            return configSource.getString(propertyName);
        }
    };
    final KillbillServerConfig serverConfig = new ConfigurationObjectFactory(skifeConfigSource).build(KillbillServerConfig.class);
    listener = new TestKillbillGuiceListener(serverConfig, configSource);
    config = new ConfigurationObjectFactory(System.getProperties()).build(HttpServerConfig.class);
    server = new HttpServer();
    server.configure(config, getListeners(), getFilters());
    server.start();
    callbackServlet = new CallbackServlet();
    callbackServer = new CallbackServer(callbackServlet);
    callbackServer.startServer();
}
Also used : KillbillConfigSource(org.killbill.billing.platform.api.KillbillConfigSource) ConfigSource(org.skife.config.ConfigSource) HttpServerConfig(org.killbill.billing.jetty.HttpServerConfig) KillbillServerConfig(org.killbill.billing.server.config.KillbillServerConfig) ConfigurationObjectFactory(org.skife.config.ConfigurationObjectFactory) HttpServer(org.killbill.billing.jetty.HttpServer) KillbillConfigSource(org.killbill.billing.platform.api.KillbillConfigSource) BeforeSuite(org.testng.annotations.BeforeSuite)

Aggregations

HttpServer (org.killbill.billing.jetty.HttpServer)1 HttpServerConfig (org.killbill.billing.jetty.HttpServerConfig)1 KillbillConfigSource (org.killbill.billing.platform.api.KillbillConfigSource)1 KillbillServerConfig (org.killbill.billing.server.config.KillbillServerConfig)1 ConfigSource (org.skife.config.ConfigSource)1 ConfigurationObjectFactory (org.skife.config.ConfigurationObjectFactory)1 BeforeSuite (org.testng.annotations.BeforeSuite)1