1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.support.resolver;
14
15 import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
16 import com.eviware.soapui.impl.wsdl.teststeps.WsdlRunTestCaseTestStep;
17 import com.eviware.soapui.support.resolver.ResolveContext.Resolver;
18
19 public class CreateNewEmptyTestCase implements Resolver
20 {
21
22 private boolean resolved;
23 private WsdlRunTestCaseTestStep testStep;
24
25 public CreateNewEmptyTestCase(WsdlRunTestCaseTestStep wsdlRunTestCaseTestStep)
26 {
27 testStep = wsdlRunTestCaseTestStep;
28 }
29
30 public String getDescription()
31 {
32 return "Create new empty test case";
33 }
34
35 @Override
36 public String toString()
37 {
38 return getDescription();
39 }
40
41 public String getResolvedPath()
42 {
43 return null;
44 }
45
46 public boolean isResolved()
47 {
48 return resolved;
49 }
50
51 public boolean resolve()
52 {
53 WsdlTestCase tCase = testStep.getTestCase().getTestSuite().addNewTestCase("New Test Case");
54 testStep.setTargetTestCase(tCase);
55 resolved = true;
56 return resolved;
57 }
58
59 }