use of javax.management.modelmbean.ModelMBeanInfo in project cxf by apache.
the class ModelMBeanAssemblerTest method testGetMBeanAttributeInfo.
@Test
public void testGetMBeanAttributeInfo() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
MBeanAttributeInfo[] inf = info.getAttributes();
assertEquals("Invalid number of Attributes returned", 4, inf.length);
for (int x = 0; x < inf.length; x++) {
assertNotNull("MBeanAttributeInfo should not be null", inf[x]);
assertNotNull("Description for MBeanAttributeInfo should not be null", inf[x].getDescription());
}
}
use of javax.management.modelmbean.ModelMBeanInfo in project cxf by apache.
the class ModelMBeanAssemblerTest method testAttributeHasCorrespondingOperations.
@Test
public void testAttributeHasCorrespondingOperations() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
ModelMBeanOperationInfo myOperation = info.getOperation("myOperation");
assertNotNull("get operation should not be null", myOperation);
assertEquals("Incorrect myOperation return type", "long", myOperation.getReturnType());
ModelMBeanOperationInfo add = info.getOperation("add");
assertNotNull("set operation should not be null", add);
assertEquals("Incorrect add method description", "Add Two Numbers Together", add.getDescription());
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class MethodExclusionMBeanInfoAssemblerMappedTests method testNickNameIsExposed.
@Test
public void testNickNameIsExposed() throws Exception {
ModelMBeanInfo inf = (ModelMBeanInfo) getMBeanInfo();
MBeanAttributeInfo attr = inf.getAttribute("NickName");
assertThat(attr).as("Nick Name should not be null").isNotNull();
assertThat(attr.isWritable()).as("Nick Name should be writable").isTrue();
assertThat(attr.isReadable()).as("Nick Name should be readable").isTrue();
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class MethodExclusionMBeanInfoAssemblerMappedTests method testGetAgeIsReadOnly.
@Test
public void testGetAgeIsReadOnly() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
ModelMBeanAttributeInfo attr = info.getAttribute(AGE_ATTRIBUTE);
assertThat(attr.isReadable()).as("Age is not readable").isTrue();
assertThat(attr.isWritable()).as("Age is not writable").isFalse();
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class MethodExclusionMBeanInfoAssemblerTests method testSupermanIsReadOnly.
@Test
public void testSupermanIsReadOnly() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
ModelMBeanAttributeInfo attr = info.getAttribute("Superman");
assertThat(attr.isReadable()).isTrue();
assertThat(attr.isWritable()).isFalse();
}
Aggregations