1 17 package org.apache.servicemix.bpe; 18 19 import java.io.File ; 20 import java.net.URI ; 21 import java.net.URL ; 22 23 import junit.framework.TestCase; 24 25 import org.apache.servicemix.bpe.BPEComponent; 26 import org.apache.servicemix.bpe.BPEDeployer; 27 import org.apache.servicemix.common.ServiceUnit; 28 29 public class BPEDeployerTest extends TestCase { 30 31 public void testDeploy() throws Exception { 32 URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel"); 33 File path = new File (new URI (url.toString())); 34 path = path.getParentFile(); 35 36 BPEComponent bpe = new BPEComponent(); 37 ((BPELifeCycle) bpe.getLifeCycle()).doInit(); 38 BPEDeployer deployer = new BPEDeployer(bpe); 39 assertTrue(deployer.canDeploy("loanbroker", path.getAbsolutePath())); 40 41 ServiceUnit su = deployer.deploy("loanbroker", path.getAbsolutePath()); 42 assertNotNull(su); 43 } 44 45 } 46 | Popular Tags |