1 7 8 package test.compliance.standard; 9 10 import junit.framework.TestCase; 11 12 import javax.management.MBeanAttributeInfo; 13 import javax.management.MBeanInfo; 14 15 18 19 public class SpuriousAttributeTEST extends TestCase 20 { 21 private String failureHint; 22 private MBeanInfo info; 23 private String attributeName; 24 25 public SpuriousAttributeTEST(String failureHint, MBeanInfo info, String attributeName) 26 { 27 super("testForSpuriousAttribute"); 28 this.failureHint = failureHint; 29 this.info = info; 30 this.attributeName = attributeName; 31 } 32 33 public void testForSpuriousAttribute() 34 { 35 MBeanAttributeInfo[] attributes = info.getAttributes(); 36 assertNull(failureHint + ": attribute " + info.getClassName() + ": " + attributeName + " should not be present", 37 InfoUtil.findAttribute(attributes, attributeName)); 38 } 39 } 40 | Popular Tags |