1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.actions.testcase;
14
15 import com.eviware.soapui.impl.wsdl.WsdlTestSuite;
16 import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
17 import com.eviware.soapui.support.UISupport;
18 import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
19
20 /***
21 * Moves the specified WsdlTestCase down one step in the WsdlTestSuites list of
22 * WsdlTestCases
23 *
24 * @author ole.matzura
25 */
26
27 public class MoveTestCaseDownAction extends AbstractSoapUIAction<WsdlTestCase>
28 {
29 public MoveTestCaseDownAction()
30 {
31 super( "Move TestCase Down", "Moves this TestCase down" );
32 }
33
34 public void perform( WsdlTestCase testCase, Object param )
35 {
36 WsdlTestSuite testSuite = testCase.getTestSuite();
37 int ix = testSuite.getIndexOfTestCase( testCase );
38 if( ix == -1 || ix >= testSuite.getTestCaseCount() - 1 )
39 return;
40
41 testSuite.moveTestCase( ix, 1 );
42 UISupport.select( testCase );
43 }
44 }