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.teststeps.WsdlTestStep;
16 import com.eviware.soapui.support.UISupport;
17 import com.eviware.soapui.support.resolver.ResolveContext.Resolver;
18
19 public class RemoveTestStepResolver implements Resolver
20 {
21 private WsdlTestStep testStep;
22 private boolean resolve;
23
24 public RemoveTestStepResolver( WsdlTestStep testStep )
25 {
26 this.testStep = testStep;
27 }
28
29 @Override
30 public String toString()
31 {
32 return getDescription();
33 }
34
35 public String getDescription()
36 {
37 return "Remove Test Step";
38 }
39
40 public String getResolvedPath()
41 {
42 return null;
43 }
44
45 public boolean isResolved()
46 {
47 return resolve;
48 }
49
50 public boolean resolve()
51 {
52 if( UISupport.confirm( "Are you sure to remove this test step?", "Remove Test Step" ) )
53 {
54 if( testStep != null )
55 {
56 testStep.getTestCase().removeTestStep( testStep );
57 resolve = true;
58 }
59 }
60 return resolve;
61 }
62
63 }