Methods Summary |
---|
public static void | main(java.lang.String[] args)
junit.textui.TestRunner.run(suite());
|
protected void | setUp()
mbean = new GeneratedMonitoringMBeanImpl();
mri = new ManagedResourceIntrospector(mbean);
stats = new S1ASJVMStatsImplMock();
|
public static junit.framework.Test | suite()
TestSuite suite = new TestSuite(ManagedResourceIntrospectorTest.class);
return suite;
|
protected void | tearDown()
|
public void | testCreation()
assertNotNull(mbean);
assertNotNull(mri);
assertNotNull(stats);
|
public void | testGetAttributeInfo()
MBeanAttributeInfo[] info = mri.getAttributeInfo(stats);
assertNotNull(info);
assertEquals(28, info.length);
|
public void | testGetAttributeInfoWithNull()
MBeanAttributeInfo[] info = mri.getAttributeInfo(null);
this.assertNull(info);
|
public void | testGetParameterInfo()
Class[] paramTypes = new Class[]{java.lang.String.class, java.lang.Integer.class,
javax.management.j2ee.statistics.Statistic.class};
MBeanParameterInfo[] info = mri.getParameterInfo(paramTypes);
assertEquals(paramTypes.length, info.length);
|
public void | testGetParameterInfoWithNull()
Class[] paramTypes = new Class[]{};
MBeanParameterInfo[] info = mri.getParameterInfo(paramTypes);
assertEquals(paramTypes.length, info.length);
|
public void | testIntrospection()
MBeanInfo info = mri.introspect(stats);
assertNotNull(info);
assertEquals(mbean.getClass().getName(), info.getClassName());
|