use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class InterfaceBasedMBeanInfoAssemblerMappedTests method testNickNameIsExposed.
@Test
public void testNickNameIsExposed() throws Exception {
ModelMBeanInfo inf = (ModelMBeanInfo) getMBeanInfo();
MBeanAttributeInfo attr = inf.getAttribute("NickName");
assertNickName(attr);
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class InterfaceBasedMBeanInfoAssemblerMappedTests method testWithFallThrough.
@Test
public void testWithFallThrough() throws Exception {
InterfaceBasedMBeanInfoAssembler assembler = getWithMapping("foobar", "org.springframework.jmx.export.assembler.ICustomJmxBean");
assembler.setManagedInterfaces(new Class<?>[] { IAdditionalTestMethods.class });
ModelMBeanInfo inf = assembler.getMBeanInfo(getBean(), getObjectName());
MBeanAttributeInfo attr = inf.getAttribute("NickName");
assertNickName(attr);
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class AnnotationMetadataAssemblerTests method testOperationOnGetter.
@Test
public void testOperationOnGetter() throws Exception {
ModelMBeanInfo inf = getMBeanInfoFromAssembler();
ModelMBeanOperationInfo op = inf.getOperation("getExpensiveToCalculate");
assertThat(op).isNotNull();
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class AbstractMetadataAssemblerTests method testOperationDescriptor.
@Test
public void testOperationDescriptor() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
Descriptor desc = info.getOperation("myOperation").getDescriptor();
assertThat(desc.getFieldValue("currencyTimeLimit")).as("Currency Time Limit should be 30").isEqualTo("30");
assertThat(desc.getFieldValue("role")).as("Role should be \"operation\"").isEqualTo("operation");
}
Aggregations