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


Java TestUserMode.SUPER_TENANT_USER属性代码示例

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


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

示例1: startServerWithEagerLoading

@BeforeClass(alwaysRun = true)
protected void startServerWithEagerLoading() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_USER);
    serverManager = new ServerConfigurationManager(context);
    AutomationContext autoContext = new AutomationContext();
    // upload a faulty sequence which refer registry resource doesn't exists
    FileUtils.copyFileToDirectory(new File(FrameworkPathUtil.getSystemResourceLocation() +
                                           "/artifacts/ESB/eager/loading/ESBJAVA3602-FaultySeq.xml"),
                                  getSynapseDeploymentDir());

    File carbonXml = new File(FrameworkPathUtil.getSystemResourceLocation() +
                              "/artifacts/ESB/eager/loading/ESBJAVA3602Carbon.xml");
    serverManager.applyConfiguration(carbonXml, getCarbonXmlFile());
    super.init(TestUserMode.TENANT_ADMIN);
    logViewerClient = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());

}
 
开发者ID:wso2,项目名称:product-ei,代码行数:17,代码来源:EagerLoadingTestCase.java

示例2: testPOSTRequestByUser

@Test(groups = {"wso2.esb"}, description = "POST request by user/tenant", dependsOnMethods = "testPOSTRequestBySuperAdmin")
public void testPOSTRequestByUser() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_USER);
    applySecurity("1", "Axis2ServiceProxy", getUserRole()[0]);
    String securedRestURL = getProxyServiceURLHttps("Axis2ServiceProxy") + "/echoString";
    HttpsResponse response = HttpsURLConnectionClient.postWithBasicAuth(securedRestURL, "s=TestAutomation",
                                                                        userInfo.getUserName(), userInfo.getPassword());
    assertTrue(response.getData().contains("<ns:echoStringResponse xmlns:ns=\"http://service.carbon.wso2.org\">" +
                                           "<ns:return>TestAutomation</ns:return></ns:echoStringResponse>")
            , "response doesn't contain the expected output");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:11,代码来源:ESBPOXSecurityPostRequestTestCase.java

示例3: testPOSTRequestByInvalidUser

@Test(groups = {"wso2.esb"}, description = "POST request by invalid user",
      dependsOnMethods = "testPOSTRequestByUser", expectedExceptions = IOException.class)
public void testPOSTRequestByInvalidUser() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_USER);
    applySecurity("1", "Axis2ServiceProxy", getUserRole()[0]);

    String securedRestURL = getProxyServiceURLHttps("Axis2ServiceProxy") + "/echoString";
    HttpsResponse response =
            HttpsURLConnectionClient.postWithBasicAuth(securedRestURL, "s=TestAutomation",
                                                       "invalidUser", "InvalidPassword");
    assertFalse(response.getData().contains("<ns:echoStringResponse xmlns:ns=\"http://service.carbon.wso2.org\">" +
                                            "<ns:return>TestAutomation</ns:return></ns:echoStringResponse>")
            , "response doesn't contain the expected output");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:14,代码来源:ESBPOXSecurityPostRequestTestCase.java

示例4: init

@BeforeClass(alwaysRun = true)
public void init() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_USER);
    updateESBConfiguration(RestEndpointSetter.setEndpoint(File.separator + "artifacts" + File.separator + "ESB" +
                                                           File.separator + "synapseconfig" + File.separator + "rest" +
                                                           File.separator + "student-service-synapse.xml"));
    applySecurity("1", "StudentServiceProxy", getUserRole()[0]);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:8,代码来源:ESBPOXSecurityByUserTestCase.java

示例5: testGetQuoteByUser

@Test(groups = {"wso2.esb"}, description = "test pox security with user credentials",
      dependsOnMethods = "testGetQuote")
public void testGetQuoteByUser() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_USER);
    applySecurity("1", SERVICE_NAME, getUserRole()[0]);
    String securedRestURL = getProxyServiceURLHttps(SERVICE_NAME) + "/getSimpleQuote";
    HttpsResponse response = HttpsURLConnectionClient.getWithBasicAuth(securedRestURL, "symbol=IBM",
                                                                       userInfo.getUserName(), userInfo.getPassword());
    assertTrue(response.getData().contains(":name>IBM Company</"),
               "getQuote doesn't return expected values");
    assertTrue(response.getData().contains(":symbol>IBM</"),
               "getQuote doesn't return expected values");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:13,代码来源:ESBPOXSecurityGetMethodTestCase.java


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