Search in sources :

Example 51 with ApplicationPolicy

use of org.wso2.carbon.apimgt.api.model.subscription.ApplicationPolicy in project carbon-apimgt by wso2.

the class APIUtilTierTest method mockPolicyRetrieval.

private void mockPolicyRetrieval(ApiMgtDAO apiMgtDAO) throws Exception {
    QuotaPolicy quotaPolicy = Mockito.mock(QuotaPolicy.class);
    ApplicationPolicy applicationPolicy = Mockito.mock(ApplicationPolicy.class);
    SubscriptionPolicy subscriptionPolicy = Mockito.mock(SubscriptionPolicy.class);
    APIPolicy apiPolicy = Mockito.mock(APIPolicy.class);
    Mockito.when(applicationPolicy.getDefaultQuotaPolicy()).thenReturn(quotaPolicy);
    Mockito.when(subscriptionPolicy.getDefaultQuotaPolicy()).thenReturn(quotaPolicy);
    Mockito.when(apiPolicy.getDefaultQuotaPolicy()).thenReturn(quotaPolicy);
    Mockito.when(apiMgtDAO.getApplicationPolicy(anyString(), anyInt())).thenReturn(applicationPolicy);
    Mockito.when(apiMgtDAO.getSubscriptionPolicy(anyString(), anyInt())).thenReturn(subscriptionPolicy);
    Mockito.when(apiMgtDAO.getAPIPolicy(anyString(), anyInt())).thenReturn(apiPolicy);
    ServiceReferenceHolder serviceReferenceHolder = Mockito.mock(ServiceReferenceHolder.class);
    Map<String, List<Notifier>> notifierMap = Mockito.mock(Map.class);
    List<Notifier> notifierList = new ArrayList<>();
    Mockito.when(notifierMap.get(any())).thenReturn(notifierList);
    Mockito.when(serviceReferenceHolder.getNotifiersMap()).thenReturn(notifierMap);
    APIManagerConfigurationService apiManagerConfigurationService = Mockito.mock(APIManagerConfigurationService.class);
    APIManagerConfiguration apiManagerConfiguration = Mockito.mock(APIManagerConfiguration.class);
    ThrottleProperties throttleProperties = Mockito.mock(ThrottleProperties.class);
    Map<String, Long> defaultLimits = new HashMap<>();
    Mockito.when(throttleProperties.getDefaultThrottleTierLimits()).thenReturn(defaultLimits);
    Mockito.when(apiManagerConfiguration.getThrottleProperties()).thenReturn(throttleProperties);
    Mockito.when(apiManagerConfigurationService.getAPIManagerConfiguration()).thenReturn(apiManagerConfiguration);
    Mockito.when(serviceReferenceHolder.getAPIManagerConfigurationService()).thenReturn(apiManagerConfigurationService);
    PowerMockito.when(ServiceReferenceHolder.getInstance()).thenReturn(serviceReferenceHolder);
}
Also used : ServiceReferenceHolder(org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder) APIManagerConfiguration(org.wso2.carbon.apimgt.impl.APIManagerConfiguration) APIManagerConfigurationService(org.wso2.carbon.apimgt.impl.APIManagerConfigurationService) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Matchers.anyString(org.mockito.Matchers.anyString) SubscriptionPolicy(org.wso2.carbon.apimgt.api.model.policy.SubscriptionPolicy) ApplicationPolicy(org.wso2.carbon.apimgt.api.model.policy.ApplicationPolicy) QuotaPolicy(org.wso2.carbon.apimgt.api.model.policy.QuotaPolicy) List(java.util.List) ArrayList(java.util.ArrayList) APIPolicy(org.wso2.carbon.apimgt.api.model.policy.APIPolicy) Notifier(org.wso2.carbon.apimgt.impl.notifier.Notifier) ThrottleProperties(org.wso2.carbon.apimgt.impl.dto.ThrottleProperties)

Example 52 with ApplicationPolicy

use of org.wso2.carbon.apimgt.api.model.subscription.ApplicationPolicy in project carbon-apimgt by wso2.

the class APIUtilTierTest method generateAppPolicies.

private ApplicationPolicy[] generateAppPolicies(String[] policyNames) {
    List<ApplicationPolicy> policyList = new ArrayList<ApplicationPolicy>();
    for (String policyName : policyNames) {
        ApplicationPolicy policy = new ApplicationPolicy(policyName);
        QuotaPolicy quotaPolicy = new QuotaPolicy();
        RequestCountLimit countLimit = new RequestCountLimit();
        countLimit.setRequestCount(123);
        quotaPolicy.setLimit(countLimit);
        policy.setDefaultQuotaPolicy(quotaPolicy);
        policy.setDescription(policyName);
        policyList.add(policy);
    }
    ApplicationPolicy[] array = {};
    return policyList.toArray(array);
}
Also used : RequestCountLimit(org.wso2.carbon.apimgt.api.model.policy.RequestCountLimit) ApplicationPolicy(org.wso2.carbon.apimgt.api.model.policy.ApplicationPolicy) ArrayList(java.util.ArrayList) QuotaPolicy(org.wso2.carbon.apimgt.api.model.policy.QuotaPolicy) Matchers.anyString(org.mockito.Matchers.anyString)

Example 53 with ApplicationPolicy

use of org.wso2.carbon.apimgt.api.model.subscription.ApplicationPolicy in project carbon-apimgt by wso2.

the class APIUtilTierTest method testGetTiersFromAppPolicies.

@Test
public void testGetTiersFromAppPolicies() throws Exception {
    System.setProperty("carbon.home", APIUtilTierTest.class.getResource("/").getFile());
    try {
        PrivilegedCarbonContext.startTenantFlow();
        PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain("abc.com");
        PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(1);
        String policyLevel = PolicyConstants.POLICY_LEVEL_APP;
        int tenantId = 1;
        ApiMgtDAOMockCreator daoMockHolder = new ApiMgtDAOMockCreator(tenantId);
        ApiMgtDAO apiMgtDAO = daoMockHolder.getMock();
        PowerMockito.mockStatic(ServiceReferenceHolder.class);
        ServiceReferenceHolder serviceReferenceHolder = Mockito.mock(ServiceReferenceHolder.class);
        Mockito.when(ServiceReferenceHolder.getInstance()).thenReturn(serviceReferenceHolder);
        APIMConfigService apimConfigService = Mockito.mock(APIMConfigService.class);
        Mockito.when(serviceReferenceHolder.getApimConfigService()).thenReturn(apimConfigService);
        Mockito.when(apimConfigService.getTenantConfig("abc.com")).thenReturn(IOUtils.toString(tenantConf));
        APIManagerConfigurationService apiManagerConfigurationService = Mockito.mock(APIManagerConfigurationService.class);
        APIManagerConfiguration apiManagerConfiguration = Mockito.mock(APIManagerConfiguration.class);
        Mockito.when(apiManagerConfigurationService.getAPIManagerConfiguration()).thenReturn(apiManagerConfiguration);
        Mockito.when(serviceReferenceHolder.getAPIManagerConfigurationService()).thenReturn(apiManagerConfigurationService);
        RealmService realmService = Mockito.mock(RealmService.class);
        TenantManager tenantManager = Mockito.mock(TenantManager.class);
        Mockito.when(realmService.getTenantManager()).thenReturn(tenantManager);
        Mockito.when(tenantManager.getDomain(1)).thenReturn("abc.com");
        Mockito.when(serviceReferenceHolder.getRealmService()).thenReturn(realmService);
        ThrottleProperties throttleProperties = new ThrottleProperties();
        throttleProperties.setEnableUnlimitedTier(true);
        Mockito.when(apiManagerConfiguration.getThrottleProperties()).thenReturn(throttleProperties);
        ApplicationPolicy[] policies = generateAppPolicies(tiersReturned);
        Mockito.when(apiMgtDAO.getApplicationPolicies(tenantId)).thenReturn(policies);
        Map<String, Tier> tiersFromPolicies = APIUtil.getTiersFromPolicies(policyLevel, tenantId);
        Mockito.verify(apiMgtDAO, Mockito.only()).getApplicationPolicies(tenantId);
        for (ApplicationPolicy policy : policies) {
            Tier tier = tiersFromPolicies.get(policy.getPolicyName());
            Assert.assertNotNull(tier);
            Assert.assertEquals(policy.getPolicyName(), tier.getName());
            Assert.assertEquals(policy.getDescription(), tier.getDescription());
        }
    } finally {
        PrivilegedCarbonContext.endTenantFlow();
    }
}
Also used : ServiceReferenceHolder(org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder) APIManagerConfiguration(org.wso2.carbon.apimgt.impl.APIManagerConfiguration) APIManagerConfigurationService(org.wso2.carbon.apimgt.impl.APIManagerConfigurationService) Tier(org.wso2.carbon.apimgt.api.model.Tier) ApiMgtDAO(org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO) Matchers.anyString(org.mockito.Matchers.anyString) RealmService(org.wso2.carbon.user.core.service.RealmService) ApplicationPolicy(org.wso2.carbon.apimgt.api.model.policy.ApplicationPolicy) ApiMgtDAOMockCreator(org.wso2.carbon.apimgt.impl.ApiMgtDAOMockCreator) APIMConfigService(org.wso2.carbon.apimgt.impl.config.APIMConfigService) TenantManager(org.wso2.carbon.user.core.tenant.TenantManager) ThrottleProperties(org.wso2.carbon.apimgt.impl.dto.ThrottleProperties) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 54 with ApplicationPolicy

use of org.wso2.carbon.apimgt.api.model.subscription.ApplicationPolicy in project carbon-apimgt by wso2.

the class APIMgtDAOTest method testAddUpdateDeleteBlockCondition.

@Test
public void testAddUpdateDeleteBlockCondition() throws Exception {
    Subscriber subscriber = new Subscriber("blockuser1");
    subscriber.setTenantId(-1234);
    subscriber.setEmail("abc@wso2.com");
    subscriber.setSubscribedDate(new Date(System.currentTimeMillis()));
    apiMgtDAO.addSubscriber(subscriber, null);
    Policy applicationPolicy = getApplicationPolicy("testAddUpdateDeleteBlockCondition");
    applicationPolicy.setTenantId(-1234);
    apiMgtDAO.addApplicationPolicy((ApplicationPolicy) applicationPolicy);
    Application application = new Application("testAddUpdateDeleteBlockCondition", subscriber);
    application.setTier("testAddUpdateDeleteBlockCondition");
    application.setId(apiMgtDAO.addApplication(application, "blockuser1", "testOrg"));
    APIIdentifier apiId = new APIIdentifier("testAddUpdateDeleteBlockCondition", "testAddUpdateDeleteBlockCondition", "1.0.0");
    API api = new API(apiId);
    api.setContext("/testAddUpdateDeleteBlockCondition");
    api.setContextTemplate("/testAddUpdateDeleteBlockCondition/{version}");
    api.setVersionTimestamp(String.valueOf(System.currentTimeMillis()));
    api.setUUID(UUID.randomUUID().toString());
    apiMgtDAO.addAPI(api, -1234, "testOrg");
    BlockConditionsDTO apiBlockConditionDto = new BlockConditionsDTO();
    apiBlockConditionDto.setConditionValue("/testAddUpdateDeleteBlockCondition");
    apiBlockConditionDto.setConditionType(APIConstants.BLOCKING_CONDITIONS_API);
    apiBlockConditionDto.setUUID(UUID.randomUUID().toString());
    apiBlockConditionDto.setTenantDomain("carbon.super");
    BlockConditionsDTO apiUUID = apiMgtDAO.addBlockConditions(apiBlockConditionDto);
    BlockConditionsDTO applicationBlockCondition = new BlockConditionsDTO();
    applicationBlockCondition.setConditionValue("blockuser1:testAddUpdateDeleteBlockCondition");
    applicationBlockCondition.setConditionType(APIConstants.BLOCKING_CONDITIONS_APPLICATION);
    applicationBlockCondition.setUUID(UUID.randomUUID().toString());
    applicationBlockCondition.setTenantDomain("carbon.super");
    BlockConditionsDTO applicationUUID = apiMgtDAO.addBlockConditions(applicationBlockCondition);
    assertNotNull(applicationUUID);
    BlockConditionsDTO ipBlockcondition = new BlockConditionsDTO();
    ipBlockcondition.setConditionValue("127.0.0.1");
    ipBlockcondition.setConditionType(APIConstants.BLOCKING_CONDITIONS_IP);
    ipBlockcondition.setUUID(UUID.randomUUID().toString());
    ipBlockcondition.setTenantDomain("carbon.super");
    BlockConditionsDTO ipUUID = apiMgtDAO.addBlockConditions(ipBlockcondition);
    assertNotNull(ipUUID);
    BlockConditionsDTO userBlockcondition = new BlockConditionsDTO();
    userBlockcondition.setConditionValue("admin");
    userBlockcondition.setConditionType(APIConstants.BLOCKING_CONDITIONS_USER);
    userBlockcondition.setUUID(UUID.randomUUID().toString());
    userBlockcondition.setTenantDomain("carbon.super");
    BlockConditionsDTO userUUID = apiMgtDAO.addBlockConditions(userBlockcondition);
    assertNotNull(apiMgtDAO.getBlockConditionByUUID(apiUUID.getUUID()));
    assertNotNull(userUUID);
    assertNotNull(apiMgtDAO.updateBlockConditionState(apiMgtDAO.getBlockConditionByUUID(userUUID.getUUID()).getConditionId(), "FALSE"));
    assertNotNull(apiMgtDAO.updateBlockConditionStateByUUID(userUUID.getUUID(), "FALSE"));
    apiMgtDAO.deleteBlockCondition(apiMgtDAO.getBlockConditionByUUID(userUUID.getUUID()).getConditionId());
    apiMgtDAO.getBlockCondition(apiMgtDAO.getBlockConditionByUUID(ipUUID.getUUID()).getConditionId());
    List<BlockConditionsDTO> blockConditions = apiMgtDAO.getBlockConditions("carbon.super");
    for (BlockConditionsDTO blockConditionsDTO : blockConditions) {
        apiMgtDAO.deleteBlockConditionByUUID(blockConditionsDTO.getUUID());
    }
    apiMgtDAO.deleteApplication(application);
    apiMgtDAO.removeThrottlePolicy(PolicyConstants.POLICY_LEVEL_APP, applicationPolicy.getPolicyName(), -1234);
    apiMgtDAO.deleteAPI(api.getUuid());
    deleteSubscriber(subscriber.getId());
}
Also used : QuotaPolicy(org.wso2.carbon.apimgt.api.model.policy.QuotaPolicy) ApplicationPolicy(org.wso2.carbon.apimgt.api.model.policy.ApplicationPolicy) APIPolicy(org.wso2.carbon.apimgt.api.model.policy.APIPolicy) SubscriptionPolicy(org.wso2.carbon.apimgt.api.model.policy.SubscriptionPolicy) Policy(org.wso2.carbon.apimgt.api.model.policy.Policy) GlobalPolicy(org.wso2.carbon.apimgt.api.model.policy.GlobalPolicy) BlockConditionsDTO(org.wso2.carbon.apimgt.api.model.BlockConditionsDTO) Subscriber(org.wso2.carbon.apimgt.api.model.Subscriber) APIIdentifier(org.wso2.carbon.apimgt.api.model.APIIdentifier) SubscribedAPI(org.wso2.carbon.apimgt.api.model.SubscribedAPI) API(org.wso2.carbon.apimgt.api.model.API) Application(org.wso2.carbon.apimgt.api.model.Application) Date(java.util.Date) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 55 with ApplicationPolicy

use of org.wso2.carbon.apimgt.api.model.subscription.ApplicationPolicy in project carbon-apimgt by wso2.

the class APIMgtDAOTest method testCreateApplicationRegistrationEntry.

@Test
public void testCreateApplicationRegistrationEntry() throws Exception {
    Subscriber subscriber = new Subscriber("testCreateApplicationRegistrationEntry");
    subscriber.setTenantId(-1234);
    subscriber.setEmail("abc@wso2.com");
    subscriber.setSubscribedDate(new Date(System.currentTimeMillis()));
    apiMgtDAO.addSubscriber(subscriber, null);
    Policy applicationPolicy = getApplicationPolicy("testCreateApplicationRegistrationEntry");
    applicationPolicy.setTenantId(-1234);
    apiMgtDAO.addApplicationPolicy((ApplicationPolicy) applicationPolicy);
    Application application = new Application("testCreateApplicationRegistrationEntry", subscriber);
    application.setTier("testCreateApplicationRegistrationEntry");
    application.setId(apiMgtDAO.addApplication(application, "testCreateApplicationRegistrationEntry", "testOrg"));
    ApplicationRegistrationWorkflowDTO applicationRegistrationWorkflowDTO = new ApplicationRegistrationWorkflowDTO();
    applicationRegistrationWorkflowDTO.setApplication(application);
    applicationRegistrationWorkflowDTO.setKeyType("PRODUCTION");
    applicationRegistrationWorkflowDTO.setDomainList("*");
    applicationRegistrationWorkflowDTO.setWorkflowReference(UUID.randomUUID().toString());
    applicationRegistrationWorkflowDTO.setValidityTime(100L);
    applicationRegistrationWorkflowDTO.setExternalWorkflowReference(UUID.randomUUID().toString());
    applicationRegistrationWorkflowDTO.setStatus(WorkflowStatus.CREATED);
    applicationRegistrationWorkflowDTO.setKeyManager("Default");
    apiMgtDAO.addWorkflowEntry(applicationRegistrationWorkflowDTO);
    OAuthAppRequest oAuthAppRequest = new OAuthAppRequest();
    OAuthApplicationInfo oAuthApplicationInfo = new OAuthApplicationInfo();
    oAuthApplicationInfo.setJsonString("");
    oAuthApplicationInfo.addParameter("tokenScope", "deafault");
    oAuthAppRequest.setOAuthApplicationInfo(oAuthApplicationInfo);
    applicationRegistrationWorkflowDTO.setAppInfoDTO(oAuthAppRequest);
    APIIdentifier apiId = new APIIdentifier("testCreateApplicationRegistrationEntry", "testCreateApplicationRegistrationEntry", "1.0.0");
    API api = new API(apiId);
    api.setContext("/testCreateApplicationRegistrationEntry");
    api.setContextTemplate("/testCreateApplicationRegistrationEntry/{version}");
    api.setUUID(UUID.randomUUID().toString());
    api.setVersionTimestamp(String.valueOf(System.currentTimeMillis()));
    int internalAPIID2 = apiMgtDAO.addAPI(api, -1234, "org1");
    api.getId().setId(internalAPIID2);
    api.setOrganization("org1");
    APIIdentifier apiId1 = new APIIdentifier("testCreateApplicationRegistrationEntry1", "testCreateApplicationRegistrationEntry1", "1.0.0");
    API api1 = new API(apiId1);
    api1.setContext("/testCreateApplicationRegistrationEntry1");
    api1.setContextTemplate("/testCreateApplicationRegistrationEntry1/{version}");
    api1.setUUID(UUID.randomUUID().toString());
    int apiInternalId = apiMgtDAO.addAPI(api1, -1234, "org2");
    api1.getId().setId(apiInternalId);
    api1.setOrganization("org2");
    apiMgtDAO.createApplicationRegistrationEntry(applicationRegistrationWorkflowDTO, false);
    ApplicationRegistrationWorkflowDTO retrievedApplicationRegistrationWorkflowDTO = new ApplicationRegistrationWorkflowDTO();
    retrievedApplicationRegistrationWorkflowDTO.setExternalWorkflowReference(applicationRegistrationWorkflowDTO.getExternalWorkflowReference());
    apiMgtDAO.populateAppRegistrationWorkflowDTO(retrievedApplicationRegistrationWorkflowDTO);
    ApiTypeWrapper apiTypeWrapper = new ApiTypeWrapper(api);
    ApiTypeWrapper apiTypeWrapper1 = new ApiTypeWrapper(api1);
    apiMgtDAO.addSubscription(apiTypeWrapper, application, APIConstants.SubscriptionStatus.ON_HOLD, subscriber.getName());
    int subsId = apiMgtDAO.addSubscription(apiTypeWrapper1, application, APIConstants.SubscriptionStatus.ON_HOLD, subscriber.getName());
    assertTrue(apiMgtDAO.isContextExist(api.getContext()));
    assertTrue(api.getContext().equals(apiMgtDAO.getAPIContext(api.getUuid())));
    apiMgtDAO.removeSubscription(apiId, application.getId());
    apiMgtDAO.removeSubscriptionById(subsId);
    apiMgtDAO.deleteAPI(api.getUuid());
    apiMgtDAO.deleteAPI(api1.getUuid());
    assertNotNull(apiMgtDAO.getWorkflowReference(application.getName(), subscriber.getName()));
    applicationRegistrationWorkflowDTO.setStatus(WorkflowStatus.APPROVED);
    apiMgtDAO.updateWorkflowStatus(applicationRegistrationWorkflowDTO);
    assertNotNull(apiMgtDAO.retrieveWorkflow(applicationRegistrationWorkflowDTO.getExternalWorkflowReference()));
    assertNotNull(apiMgtDAO.retrieveWorkflowFromInternalReference(applicationRegistrationWorkflowDTO.getWorkflowReference(), applicationRegistrationWorkflowDTO.getWorkflowType()));
    apiMgtDAO.removeWorkflowEntry(applicationRegistrationWorkflowDTO.getExternalWorkflowReference(), applicationRegistrationWorkflowDTO.getWorkflowType());
    apiMgtDAO.deleteApplicationKeyMappingByApplicationIdAndType(application.getId(), "PRODUCTION");
    apiMgtDAO.deleteApplicationRegistration(application.getId(), "PRODUCTION", APIConstants.KeyManager.DEFAULT_KEY_MANAGER);
    apiMgtDAO.deleteApplication(application);
    apiMgtDAO.removeThrottlePolicy(PolicyConstants.POLICY_LEVEL_APP, "testCreateApplicationRegistrationEntry", -1234);
    deleteSubscriber(subscriber.getId());
}
Also used : QuotaPolicy(org.wso2.carbon.apimgt.api.model.policy.QuotaPolicy) ApplicationPolicy(org.wso2.carbon.apimgt.api.model.policy.ApplicationPolicy) APIPolicy(org.wso2.carbon.apimgt.api.model.policy.APIPolicy) SubscriptionPolicy(org.wso2.carbon.apimgt.api.model.policy.SubscriptionPolicy) Policy(org.wso2.carbon.apimgt.api.model.policy.Policy) GlobalPolicy(org.wso2.carbon.apimgt.api.model.policy.GlobalPolicy) ApplicationRegistrationWorkflowDTO(org.wso2.carbon.apimgt.impl.dto.ApplicationRegistrationWorkflowDTO) Subscriber(org.wso2.carbon.apimgt.api.model.Subscriber) OAuthAppRequest(org.wso2.carbon.apimgt.api.model.OAuthAppRequest) ApiTypeWrapper(org.wso2.carbon.apimgt.api.model.ApiTypeWrapper) OAuthApplicationInfo(org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo) APIIdentifier(org.wso2.carbon.apimgt.api.model.APIIdentifier) SubscribedAPI(org.wso2.carbon.apimgt.api.model.SubscribedAPI) API(org.wso2.carbon.apimgt.api.model.API) Application(org.wso2.carbon.apimgt.api.model.Application) Date(java.util.Date) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

ApplicationPolicy (org.wso2.carbon.apimgt.core.models.policy.ApplicationPolicy)56 Test (org.testng.annotations.Test)30 ApplicationPolicy (org.wso2.carbon.apimgt.api.model.policy.ApplicationPolicy)29 PolicyDAO (org.wso2.carbon.apimgt.core.dao.PolicyDAO)24 ArrayList (java.util.ArrayList)23 Test (org.junit.Test)18 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)18 SubscriptionPolicy (org.wso2.carbon.apimgt.core.models.policy.SubscriptionPolicy)18 Application (org.wso2.carbon.apimgt.core.models.Application)17 Connection (java.sql.Connection)16 PreparedStatement (java.sql.PreparedStatement)16 SQLException (java.sql.SQLException)16 ResultSet (java.sql.ResultSet)13 BeforeTest (org.testng.annotations.BeforeTest)13 APIStore (org.wso2.carbon.apimgt.core.api.APIStore)13 ApplicationDAO (org.wso2.carbon.apimgt.core.dao.ApplicationDAO)13 APIMgtDAOException (org.wso2.carbon.apimgt.core.exception.APIMgtDAOException)13 Policy (org.wso2.carbon.apimgt.core.models.policy.Policy)13 APIPolicy (org.wso2.carbon.apimgt.api.model.policy.APIPolicy)12 SubscriptionPolicy (org.wso2.carbon.apimgt.api.model.policy.SubscriptionPolicy)12