1 package com.eviware.soapui.impl.wsdl.actions.testsuite; 2 3 import java.io.File; 4 5 import com.eviware.soapui.impl.wsdl.WsdlTestSuite; 6 import com.eviware.soapui.support.UISupport; 7 import com.eviware.soapui.support.action.support.AbstractSoapUIAction; 8 9 public class ImportTestCaseAction extends AbstractSoapUIAction<WsdlTestSuite> 10 { 11 12 public ImportTestCaseAction() 13 { 14 super("Import Test Case", "Import test case in this test suite"); 15 } 16 17 public void perform(WsdlTestSuite testSuite, Object param) 18 { 19 20 File file = UISupport.getFileDialogs().openXML(this, "Choose test case to import"); 21 22 if (file == null) 23 return; 24 25 String fileName = file.getAbsolutePath(); 26 if (fileName == null) 27 return; 28 29 testSuite.importTestCase(file); 30 31 } 32 33 }