当前位置: 首页>>代码示例>>Java>>正文


Java TestUserMode.TENANT_USER属性代码示例

本文整理汇总了Java中org.wso2.carbon.automation.engine.context.TestUserMode.TENANT_USER属性的典型用法代码示例。如果您正苦于以下问题:Java TestUserMode.TENANT_USER属性的具体用法?Java TestUserMode.TENANT_USER怎么用?Java TestUserMode.TENANT_USER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.wso2.carbon.automation.engine.context.TestUserMode的用法示例。


在下文中一共展示了TestUserMode.TENANT_USER属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

@BeforeClass(alwaysRun = true)
public void initialize() throws Exception {
    super.init(userMode);
    String resourceFileLocation;
    resourceFileLocation = getResourceLocation();
    //DataSource already exist by default for super user.
    if (userMode == TestUserMode.TENANT_ADMIN || userMode == TestUserMode.TENANT_USER) {
        addDataSources();
    }
    deployService(serviceName,
                  new DataHandler(new URL("file:///" + resourceFileLocation +
                                          File.separator + "samples" + File.separator +
                                          "dbs" + File.separator + "inmemory" + File.separator +
                                          "InMemoryDSSample.dbs")));
    log.info(serviceName + " uploaded");
    serviceUrl = getServiceUrlHttp(serviceName);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:17,代码来源:InMemoryDSSampleTestCase.java

示例2: validateServiceUrl

private void validateServiceUrl(String serviceUrl, Tenant tenant) {
    //if user mode is null can not validate the service url
    if (userMode != null) {
        if ((userMode == TestUserMode.TENANT_ADMIN || userMode == TestUserMode.TENANT_USER)) {
            Assert.assertTrue(serviceUrl.contains("/t/" + tenant.getDomain() + "/"), "invalid service url for tenant. " + serviceUrl);
        } else {
            Assert.assertFalse(serviceUrl.contains("/t/"), "Invalid service url for user. " + serviceUrl);
        }
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:10,代码来源:DSSIntegrationTest.java

示例3: serviceDeployment

@BeforeClass(alwaysRun = true)
public void serviceDeployment() throws Exception {

    super.init(TestUserMode.TENANT_USER);
    List<File> sqlFileLis = new ArrayList<File>();
    sqlFileLis.add(selectSqlFile("RequestBoxTestTables.sql"));
    deployService(serviceName,
                  createArtifact(getResourceLocation() + File.separator + "dbs" + File.separator
                                 + "rdbms" + File.separator + "h2" + File.separator
                                 + "RequestBoxTenantTest.dbs", sqlFileLis));
    serviceEndPoint = getServiceUrlHttp(serviceName);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:12,代码来源:RequestBoxTenantUserTestCase.java

示例4: serviceDeployment

@BeforeClass(alwaysRun = true)
public void serviceDeployment() throws Exception {
	super.init(TestUserMode.TENANT_USER);
	List<File> sqlFileLis = new ArrayList<>();
	sqlFileLis.add(selectSqlFile("CreateODataTables.sql"));
	sqlFileLis.add(selectSqlFile("Customers.sql"));
	deployService(serviceName,
	              createArtifact(getResourceLocation() + File.separator + "dbs" + File.separator + "odata" +
	                             File.separator + "ODataSampleTenantService.dbs", sqlFileLis));
	webAppUrl = dssContext.getContextUrls().getWebAppURL();
	int i = webAppUrl.indexOf("/t/");
	webAppUrl = webAppUrl.substring(0,i);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:13,代码来源:ODataTenantUserTestCase.java

示例5: isTenant

protected boolean isTenant() throws Exception {
    if(userMode == null){
        throw new Exception("UserMode Not Initialized. Can not identify user type");
    }
    return (userMode == TestUserMode.TENANT_ADMIN || userMode == TestUserMode.TENANT_USER);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:6,代码来源:DSSIntegrationTest.java


注:本文中的org.wso2.carbon.automation.engine.context.TestUserMode.TENANT_USER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。