use of org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider in project carbon-identity-framework by wso2.
the class ApplicationManagementServiceImplTest method addApplicationDataProvider.
@DataProvider(name = "addApplicationDataProvider")
public Object[][] addApplicationDataProvider() {
ServiceProvider serviceProvider1 = new ServiceProvider();
serviceProvider1.setApplicationName(APPLICATION_NAME_1);
ServiceProvider serviceProvider2 = new ServiceProvider();
serviceProvider2.setApplicationName(APPLICATION_NAME_2);
return new Object[][] { { serviceProvider1, SUPER_TENANT_DOMAIN_NAME, USERNAME_1 }, { serviceProvider2, SAMPLE_TENANT_DOMAIN, USERNAME_2 } };
}
use of org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider in project carbon-identity-framework by wso2.
the class ApplicationManagementServiceImplTest method testGetServiceProviderByClientId.
@Test
public void testGetServiceProviderByClientId() throws IdentityApplicationManagementException {
ServiceProvider inputSP = new ServiceProvider();
inputSP.setApplicationName(APPLICATION_NAME_1);
addApplicationConfigurations(inputSP);
// Adding application.
applicationManagementService.createApplication(inputSP, SUPER_TENANT_DOMAIN_NAME, USERNAME_1);
// Retrieving application by ResourceId.
ServiceProvider actual = applicationManagementService.getServiceProviderByClientId("auth key", "oauth2", SUPER_TENANT_DOMAIN_NAME);
Assert.assertEquals(actual.getApplicationName(), inputSP.getApplicationName());
Assert.assertEquals(actual.getOwner().getUserName(), USERNAME_1);
Assert.assertEquals(actual.getDescription(), inputSP.getDescription());
// Deleting added application.
applicationManagementService.deleteApplications(SUPER_TENANT_ID);
}
use of org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider in project carbon-identity-framework by wso2.
the class ApplicationManagementServiceImplTest method addApplicationInvalidAppNameDataProvider.
@DataProvider(name = "addApplicationInvalidAppNameDataProvider")
public Object[][] addApplicationInvalidAppNameDataProvider() {
ServiceProvider serviceProvider1 = new ServiceProvider();
serviceProvider1.setApplicationName("@#!app");
ServiceProvider serviceProvider2 = new ServiceProvider();
serviceProvider2.setApplicationName("1234@");
return new Object[][] { { serviceProvider1, SUPER_TENANT_DOMAIN_NAME, USERNAME_1 }, { serviceProvider2, SUPER_TENANT_DOMAIN_NAME, USERNAME_1 } };
}
use of org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider in project carbon-identity-framework by wso2.
the class ApplicationManagementServiceImplTest method addApplications.
private void addApplications() throws IdentityApplicationManagementException {
ServiceProvider serviceProvider1 = new ServiceProvider();
serviceProvider1.setApplicationName(APPLICATION_NAME_1);
ServiceProvider serviceProvider2 = new ServiceProvider();
serviceProvider2.setApplicationName(APPLICATION_NAME_2);
applicationManagementService.addApplication(serviceProvider1, SUPER_TENANT_DOMAIN_NAME, USERNAME_1);
applicationManagementService.addApplication(serviceProvider2, SUPER_TENANT_DOMAIN_NAME, USERNAME_1);
}
use of org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider in project carbon-identity-framework by wso2.
the class ApplicationManagementServiceImplTest method addApplicationWithExistingAppNameDataProvider.
@DataProvider(name = "addApplicationWithExistingAppNameDataProvider")
public Object[][] addApplicationWithExistingAppNameDataProvider() {
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(APPLICATION_NAME_1);
ServiceProvider newServiceProvider = new ServiceProvider();
newServiceProvider.setApplicationName(APPLICATION_NAME_1);
return new Object[][] { { serviceProvider, newServiceProvider, SUPER_TENANT_DOMAIN_NAME, USERNAME_1 } };
}
Aggregations