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


Java WsdlTestRequestStep类代码示例

本文整理汇总了Java中com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep的典型用法代码示例。如果您正苦于以下问题:Java WsdlTestRequestStep类的具体用法?Java WsdlTestRequestStep怎么用?Java WsdlTestRequestStep使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: collectWsdlTestRequests

import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep; //导入依赖的package包/类
/**
 * Collect and filter by operation all the WsldTestrequest from the current project.
 */
private Map<String, WsdlTestRequest> collectWsdlTestRequests(Operation operation){
   Map<String, WsdlTestRequest> result = new HashMap<>();

   for (TestSuite testsuite : project.getTestSuiteList()){
      for (TestCase testcase : testsuite.getTestCaseList()){
         for (TestStep teststep : testcase.getTestStepList()){
            if (teststep instanceof WsdlTestRequestStep){
               WsdlTestRequestStep ws = (WsdlTestRequestStep)teststep;
               WsdlTestRequest wr = ws.getHttpRequest();
               if (wr.getOperationName().equals(operation.getName())){
                  result.put(wr.getName(), wr);
               }
            }
         }
      }
   }
   return result;
}
 
开发者ID:microcks,项目名称:microcks,代码行数:22,代码来源:SoapUIProjectImporter.java

示例2: testImportWsdlRequest

import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep; //导入依赖的package包/类
@Test
public void testImportWsdlRequest() {
    PostmanImporter importer = new PostmanImporter(new DummyTestCreator());
    WsdlProject postmanProject = importer.importPostmanCollection(workspace,
            PostmanImporterTest.class.getResource(WSDL_COLLECTION_PATH).getPath());

    assertEquals("Project should be named after collection", COLLECTION_NAME, postmanProject.getName());
    Map<String, Interface> interfaceMap = postmanProject.getInterfaces();
    assertEquals("Project should have 2 interface", 2, interfaceMap.size());
    Interface service = postmanProject.getInterfaceAt(0);
    assertThat(service, instanceOf(WsdlInterface.class));

    WsdlInterface wsdlInterface = (WsdlInterface) service;
    WsdlOperation operation = wsdlInterface.getOperationByName(OPERATION_NAME);
    assertNotNull("Operation is missing", operation);

    assertEquals("Operation should have 1 request", 1, operation.getRequestCount());
    WsdlRequest request = operation.getRequestAt(0);
    assertEquals("Request has wrong name", WSDL_REQUEST_NAME, request.getName());
    assertEquals("Request has wrong endpoint", SOAP_ENDPOINT, request.getEndpoint());

    WsdlTestSuite testSuite = postmanProject.getTestSuiteAt(0);
    WsdlTestCase testCase = testSuite.getTestCaseAt(0);
    WsdlTestRequestStep testStep = (WsdlTestRequestStep) testCase.getTestStepAt(0);
    TestAssertion assertion = testStep.getAssertionAt(0);
    assertThat(assertion, instanceOf(ValidHttpStatusCodesAssertion.class));
}
 
开发者ID:SmartBear,项目名称:readyapi-postman-plugin,代码行数:28,代码来源:PostmanImporterTest.java


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