package be.ehealth.businessconnector.hubv3.session;

import be.ehealth.technicalconnector.config.ConfigFactory;
import be.ehealth.technicalconnector.config.impl.ConfigurationModuleProxy;
import org.junit.rules.ExternalResource;

/**
 * @author EHP
 */
public class InitHubRule extends ExternalResource {

    private HubService hubService;

    @Override
    protected void before() throws Throwable {
        new ConfigurationModuleProxy().init(ConfigFactory.getConfigValidator().getConfig());
        hubService = HubSessionServiceFactory.getHubService();
    }

    public HubService getHubService() {
        return hubService;
    }
}
