本文整理汇总了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;
}
示例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));
}