KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > test > cache > unit > CacheUnitTestCase


1 /*
2  *
3  * JBoss, the OpenSource J2EE webOS
4  *
5  * Distributable under LGPL license.
6  * See terms of license at gnu.org.
7  */

8
9 package org.jboss.ejb3.test.cache.unit;
10
11 //import java.rmi.*;
12

13
14 import junit.framework.Test;
15 import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
16 import org.jboss.test.JBossTestCase;
17
18 import javax.management.MBeanServerConnection JavaDoc;
19 import javax.management.ObjectName JavaDoc;
20
21 /**
22  * Sample client for the jboss container.
23  *
24  * @author <a HREF="mailto:bill@burkecentral.com">Bill Burke</a>
25  * @version $Id: CacheUnitTestCase.java,v 1.2.2.2 2005/06/21 04:47:37 bill Exp $
26  */

27
28 public class CacheUnitTestCase
29 extends JBossTestCase
30 {
31    org.apache.log4j.Category log = getLog();
32
33    static boolean deployed = false;
34    static int test = 0;
35
36    public CacheUnitTestCase(String JavaDoc name)
37    {
38
39       super(name);
40
41    }
42
43    public void testSimple() throws Exception JavaDoc
44    {
45        MBeanServerConnection JavaDoc server = getServer();
46       ObjectName JavaDoc testerName = new ObjectName JavaDoc("jboss.ejb3:service=Tester,test=cache");
47       Object JavaDoc[] params = {};
48       String JavaDoc[] sig = {};
49       server.invoke(testerName, "test", params, sig);
50    }
51
52    public static Test suite() throws Exception JavaDoc
53    {
54       return getDeploySetup(CacheUnitTestCase.class, "testejb3-cache-service.xml, cache-test.sar");
55    }
56
57 }
58
Popular Tags