Search in sources :

Example 6 with WorkflowConfig

use of org.wso2.carbon.apimgt.core.models.WorkflowConfig in project carbon-apimgt by wso2.

the class APIStoreImplTestCase method setup.

@BeforeTest
public void setup() throws Exception {
    WorkflowExtensionsConfigBuilder.build(new ConfigProvider() {

        @Override
        public <T> T getConfigurationObject(Class<T> configClass) throws ConfigurationException {
            T workflowConfig = (T) new WorkflowConfig();
            return workflowConfig;
        }

        @Override
        public Object getConfigurationObject(String s) throws ConfigurationException {
            return null;
        }

        public <T> T getConfigurationObject(String s, Class<T> aClass) throws ConfigurationException {
            return null;
        }
    });
    ConfigProvider configProvider = Mockito.mock(ConfigProvider.class);
    ServiceReferenceHolder.getInstance().setConfigProvider(configProvider);
}
Also used : WorkflowConfig(org.wso2.carbon.apimgt.core.models.WorkflowConfig) ConfigProvider(org.wso2.carbon.config.provider.ConfigProvider) ConfigurationException(org.wso2.carbon.config.ConfigurationException) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

WorkflowConfig (org.wso2.carbon.apimgt.core.models.WorkflowConfig)5 ConfigurationException (org.wso2.carbon.config.ConfigurationException)3 ConfigProvider (org.wso2.carbon.config.provider.ConfigProvider)3 BeforeTest (org.testng.annotations.BeforeTest)2 File (java.io.File)1 BeforeClass (org.testng.annotations.BeforeClass)1 Test (org.testng.annotations.Test)1 WorkflowExecutor (org.wso2.carbon.apimgt.core.api.WorkflowExecutor)1 WorkflowException (org.wso2.carbon.apimgt.core.exception.WorkflowException)1 WorkflowConfigProperties (org.wso2.carbon.apimgt.core.models.WorkflowConfigProperties)1