01: /*
02: * soapUI, copyright (C) 2004-2007 eviware.com
03: *
04: * soapUI is free software; you can redistribute it and/or modify it under the
05: * terms of version 2.1 of the GNU Lesser General Public License as published by
06: * the Free Software Foundation.
07: *
08: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
09: * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: * See the GNU Lesser General Public License for more details at gnu.org.
11: */
12:
13: package com.eviware.soapui.impl.wsdl.teststeps.registry;
14:
15: import com.eviware.soapui.config.GotoStepConfig;
16: import com.eviware.soapui.config.TestStepConfig;
17: import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
18: import com.eviware.soapui.impl.wsdl.teststeps.WsdlGotoTestStep;
19: import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep;
20:
21: /**
22: * Factory for creation TransferValue steps
23: *
24: * @author Ole.Matzura
25: */
26:
27: public class GotoStepFactory extends WsdlTestStepFactory {
28: public static final String GOTO_TYPE = "goto";
29:
30: public GotoStepFactory() {
31: super (
32: GOTO_TYPE,
33: "Conditional Goto",
34: "Transfers the execution to another TestStep based on xpath expressions",
35: "/goto.gif");
36: }
37:
38: public WsdlTestStep buildTestStep(WsdlTestCase testCase,
39: TestStepConfig config, boolean forLoadTest) {
40: return new WsdlGotoTestStep(testCase, config, forLoadTest);
41: }
42:
43: public TestStepConfig createNewTestStep(WsdlTestCase testCase,
44: String name) {
45: TestStepConfig testStepConfig = TestStepConfig.Factory
46: .newInstance();
47: testStepConfig.setType(GOTO_TYPE);
48: testStepConfig.setName(name);
49: testStepConfig.setConfig(GotoStepConfig.Factory.newInstance());
50: return testStepConfig;
51: }
52:
53: public boolean canCreate() {
54: return true;
55: }
56: }
|