1 19 20 package org.netbeans.modules.j2ee.deployment.impl; 21 22 import junit.framework.*; 23 import org.netbeans.junit.*; 24 import java.util.*; 25 import java.io.*; 26 import org.netbeans.modules.j2ee.deployment.execution.DeploymentTarget; 27 import org.netbeans.modules.j2ee.deployment.impl.*; 28 import javax.enterprise.deploy.spi.*; 29 import org.netbeans.tests.j2eeserver.plugin.jsr88.DepManager; 30 import org.netbeans.modules.j2ee.deployment.impl.ui.*; 31 32 36 public class TargetServerTest extends NbTestCase { 37 38 public TargetServerTest(java.lang.String testName) { 39 super(testName); 40 } 41 42 public static Test suite() { 43 TestSuite suite = new NbTestSuite(TargetServerTest.class); 44 return suite; 51 } 52 53 ServerString server; 54 ServerString getSuiteTargetServer() { 55 return getTargetServer(null); 56 } 57 ServerString getTargetServer(String name){ 58 if (server != null) 59 return server; 60 61 ServerRegistry registry = ServerRegistry.getInstance(); 62 String url = "fooservice:TargetServerTest"; 63 if (name != null) 64 url += "_"+name; 65 try { 66 registry.addInstance(url, "user", "password", "TestInstance"); 67 } catch (IOException ioe) { throw new RuntimeException (ioe); } 68 69 server = new ServerString(registry.getServerInstance(url).getServerTarget("Target 1")); 70 return server; 71 } 72 73 74 100 101 107 108 114 115 124 125 131 132 public void testWebContextRoot() { 133 134 } 135 136 } 137 | Popular Tags |