User: squirest
Date: 01/12/19 17:50:59
Added: src/main/test/compliance/standard StandardSUITE.java
TrivialTEST.java
Log:
First pass at a suite of compliance tests
Revision Changes Path
1.1 jmx/src/main/test/compliance/standard/StandardSUITE.java
Index: StandardSUITE.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package test.compliance.standard;
import junit.framework.Test;
import junit.framework.TestSuite;
public class StandardSUITE extends TestSuite
{
public static void main(String[] args)
{
junit.textui.TestRunner.run(suite());
}
public static Test suite()
{
TestSuite suite = new TestSuite("StandardMBean Tests");
suite.addTest(new TestSuite(TrivialTEST.class));
return suite;
}
}
1.1 jmx/src/main/test/compliance/standard/TrivialTEST.java
Index: TrivialTEST.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package test.compliance.standard;
import junit.framework.TestCase;
import test.compliance.standard.support.Trivial;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
public class TrivialTEST extends TestCase
{
public TrivialTEST(String s)
{
super(s);
}
public void testRegistration()
{
MBeanServer server = MBeanServerFactory.newMBeanServer();
Trivial trivial = new Trivial();
ObjectName name = null;
try
{
name = new ObjectName("trivial:key=val");
ObjectInstance instance = server.registerMBean(trivial, name);
}
catch (Exception e)
{
fail("registration failed: " + e.getMessage());
}
assertTrue("expected server to report it as registered",
server.isRegistered(name));
}
// public void testAvailableInfo()
// {
// MBeanServer server = MBeanServerFactory.newMBeanServer();
// Trivial trivial = new Trivial();
//
// ObjectName name = new ObjectName("trivial:key=val");
// ObjectInstance instance = server.registerMBean(trivial, name);
// MBeanInfo info = server.getMBeanInfo(name);
// }
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development