本文整理汇总了Java中org.wso2.carbon.automation.engine.context.AutomationContext.getContextTenant方法的典型用法代码示例。如果您正苦于以下问题:Java AutomationContext.getContextTenant方法的具体用法?Java AutomationContext.getContextTenant怎么用?Java AutomationContext.getContextTenant使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wso2.carbon.automation.engine.context.AutomationContext
的用法示例。
在下文中一共展示了AutomationContext.getContextTenant方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入方法依赖的package包/类
protected void init(TestUserMode userType) throws Exception {
// dssContext = new AutomationContext("DSS", "dss01", "carbon.supper", "admin");
dssContext = new AutomationContext(PRODUCT_NAME, userType);
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(dssContext);
sessionCookie = loginLogoutClient.login();
//return the current tenant as the userType(TestUserMode)
tenantInfo = dssContext.getContextTenant();
//return the user information initialized with the system
userInfo = tenantInfo.getContextUser();
}
示例2: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入方法依赖的package包/类
/**
* Initialize the context given a tenant domain and a user.
*
* @param tenantName the name of the tenant domain. Should be one of the domains specified in the automation.xml
* @param userName The name of the user to be initialized
* @throws Exception if an error occurs during context initialization
*/
protected void init(String tenantName, String userName) throws Exception {
axis2Client = new StockQuoteClient();
DefaultInstance defaultInstance = new DefaultInstance();
String instanceName = defaultInstance.getDefaultManager(ESBTestConstant.ESB_PRODUCT_GROUP);
context = new AutomationContext(ESBTestConstant.ESB_PRODUCT_GROUP, instanceName, tenantName, userName);
contextUrls = context.getContextUrls();
sessionCookie = login(context);
esbUtils = new ESBTestCaseUtils();
tenantInfo = context.getContextTenant();
userInfo = tenantInfo.getContextUser();
}
示例3: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入方法依赖的package包/类
protected void init(TestUserMode userType) throws Exception {
esContext = new AutomationContext("ES", userType);
automationContext = esContext;
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(esContext);
sessionCookie = loginLogoutClient.login();
//return the current tenant as the userType(TestUserMode)
tenantInfo = esContext.getContextTenant();
//return the user information initialized with the system
userInfo = automationContext.getContextTenant().getContextUser();
backendURL = automationContext.getContextUrls().getBackEndUrl();
webAppURL = automationContext.getContextUrls().getWebAppURL();
storeContext = new AutomationContext("ES", "store", userType);
publisherContext = new AutomationContext("ES", "publisher", userType);
}
示例4: setInfoRolesAndUsers
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入方法依赖的package包/类
public void setInfoRolesAndUsers(String adminUserKey)
throws LoginAuthenticationExceptionException, RemoteException,
XPathExpressionException {
//todo -
// FrameworkProperties isProperties = FrameworkFactory.getFrameworkProperties(ProductConstant.IS_SERVER_NAME);
AutomationContext isContext = new AutomationContext("IS", "is", "carbon.supper", adminUserKey);
Tenant userAdminDetails = isContext.getContextTenant();
sessionCookie = login(userAdminDetails.getContextUser().getUserName(), userAdminDetails.getContextUser().getPassword(),
isContext.getContextUrls().getBackEndUrl());
userAdminStub = new UserManagementClient(isContext.getContextUrls().getBackEndUrl(), sessionCookie);
}
示例5: buildTenantDetails
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入方法依赖的package包/类
protected void buildTenantDetails(TestUserMode userMode) throws Exception {
AutomationContext automationContext = new AutomationContext(PRODUCT_GROUP_NAME, userMode);
tenantDetails = automationContext.getContextTenant();
}