1 package org.seasar.remoting.rmi.deployer;
2
3 import java.rmi.registry.LocateRegistry;
4
5 import junit.framework.Test;
6 import junit.framework.TestSuite;
7
8 import org.seasar.extension.unit.S2TestCase;
9 import org.seasar.remoting.rmi.adaptor.RMIAdaptor;
10
11 /***
12 * @author murata
13 */
14 public class RMIAdaptorDeployerTest extends S2TestCase {
15 private static String PATH = "test.dicon";
16
17
18 private RMIAdaptorDeployer deployer;
19
20 public void testDeploy() throws Exception {
21 deployer.setAdaptor(null);
22 deployer.deploy();
23 }
24
25 public void testDeploy2() throws Exception {
26 deployer.deploy();
27 String[] remoteNmae = LocateRegistry.getRegistry(1108).list();
28
29 assertEquals(remoteNmae[0], RMIAdaptor.EXPORT_NAME);
30 }
31
32 protected void setUp() throws Exception {
33
34 include(PATH);
35 }
36
37 protected void tearDown() throws Exception {
38 }
39
40 public RMIAdaptorDeployerTest(String arg0) {
41 super(arg0);
42 }
43
44 public static Test suite() {
45 return new TestSuite(RMIAdaptorDeployerTest.class);
46 }
47
48 public static void main(String[] args) {
49 junit.textui.TestRunner.run(suite());
50 System.exit(0);
51 }
52 }