User: juhalindfors Date: 02/01/24 14:44:12 Modified: src/main/test/implementation/util UtilSUITE.java Added: src/main/test/implementation/util AgentIDTEST.java Log: Revision Changes Path 1.2 +1 -0 jmx/src/main/test/implementation/util/UtilSUITE.java Index: UtilSUITE.java =================================================================== RCS file: /cvsroot/jboss/jmx/src/main/test/implementation/util/UtilSUITE.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- UtilSUITE.java 2002/01/23 21:49:25 1.1 +++ UtilSUITE.java 2002/01/24 22:44:12 1.2 @@ -22,6 +22,7 @@ TestSuite suite = new TestSuite("JBossMX Util Tests"); suite.addTest(new TestSuite(MBeanProxyTEST.class)); + suite.addTest(new TestSuite(AgentIDTEST.class)); return suite; } 1.1 jmx/src/main/test/implementation/util/AgentIDTEST.java Index: AgentIDTEST.java =================================================================== /* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package test.implementation.util; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.ObjectName; import junit.framework.TestCase; import org.jboss.mx.server.ServerConstants; import org.jboss.mx.util.AgentID; public class AgentIDTEST extends TestCase implements ServerConstants { public AgentIDTEST(String s) { super(s); } public void testCreate() { String id1 = AgentID.create(); String id2 = AgentID.create(); assertTrue(!id1.equals(id2)); } public void testGet() { try { MBeanServer server = MBeanServerFactory.createMBeanServer(); String id1 = (String)server.getAttribute(new ObjectName(MBEAN_SERVER_DELEGATE), "MBeanServerId"); String id2 = AgentID.get(server); assertTrue(id1.equals(id2)); } catch (Throwable t) { t.printStackTrace(); fail("Unexpected error: " + t.toString()); } } }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development