1 22 package org.jboss.test.jmx.compliance.standard; 23 24 import javax.management.MBeanConstructorInfo ; 25 import javax.management.MBeanInfo ; 26 27 import junit.framework.TestCase; 28 29 32 33 public class ConstructorInfoTEST extends TestCase 34 { 35 private String failureHint; 36 private MBeanInfo info; 37 private String constructorName; 38 private String signatureString; 39 40 public ConstructorInfoTEST(String failureHint, MBeanInfo info, String constructorName, String [] signature) 41 { 42 super("testValidConstructor"); 43 this.failureHint = failureHint; 44 this.info = info; 45 this.constructorName = constructorName; 46 this.signatureString = InfoUtil.makeSignatureString(signature); 47 } 48 49 public void testValidConstructor() 50 { 51 MBeanConstructorInfo [] constructors = info.getConstructors(); 52 53 MBeanConstructorInfo foundConstructor= null; 54 55 for (int i = 0; i < constructors.length; i++) 56 { 57 if (signatureString.equals(InfoUtil.makeSignatureString(constructors[i].getSignature()))) 58 { 59 foundConstructor = constructors[i]; 60 break; 61 } 62 } 63 64 assertNotNull(failureHint + ": " + info.getClassName() + "." + constructorName + signatureString + " was not found", foundConstructor); 65 } 66 } 67 | Popular Tags |