1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.teststeps;
14
15 import java.io.File;
16
17 import junit.framework.TestCase;
18
19 import com.eviware.soapui.impl.wsdl.WsdlProject;
20 import com.eviware.soapui.impl.wsdl.panels.support.MockTestRunContext;
21 import com.eviware.soapui.impl.wsdl.panels.support.MockTestRunner;
22 import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
23 import com.eviware.soapui.model.testsuite.TestStepResult;
24 import com.eviware.soapui.model.testsuite.TestSuite;
25
26 public class WsdlRequestStepTestCase extends TestCase
27 {
28 public void testAssert() throws Exception
29 {
30 WsdlProject project = new WsdlProject("src" + File.separatorChar + "test-resources" + File.separatorChar + "sample-soapui-project.xml");
31 TestSuite testSuite = project.getTestSuiteByName("Test Suite");
32 com.eviware.soapui.model.testsuite.TestCase testCase =
33 testSuite.getTestCaseByName("Test Conversions");
34
35 WsdlTestRequestStep testStep = ( WsdlTestRequestStep ) testCase.getTestStepByName("SEK to USD Test");
36
37 MockTestRunner testRunner = new MockTestRunner( (WsdlTestCase) testStep.getTestCase() );
38 MockTestRunContext testRunContext = new MockTestRunContext( testRunner, (WsdlTestStep) testStep );
39
40 TestStepResult result = testStep.run( testRunner, testRunContext );
41
42 WsdlTestRequestStepResult wsdlResult = (WsdlTestRequestStepResult)result;
43 assertEquals(TestStepResult.TestStepStatus.OK, wsdlResult.getStatus());
44 }
45 }