MBeanInfoAssembler impls expose actual method parameter names if possible

Issue: SPR-9985
This commit is contained in:
Juergen Hoeller
2013-01-23 13:40:22 +01:00
committed by unknown
parent 2ee70d683d
commit 4dde7c4c16
3 changed files with 54 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
@@ -16,11 +16,13 @@
package org.springframework.jmx.export.assembler;
import javax.management.MBeanOperationInfo;
import javax.management.modelmbean.ModelMBeanAttributeInfo;
import javax.management.modelmbean.ModelMBeanInfo;
/**
* @author Rob Harrop
* @author David Boden
*/
public class MethodNameBasedMBeanInfoAssemblerTests extends AbstractJmxAssemblerTests {
@@ -56,6 +58,13 @@ public class MethodNameBasedMBeanInfoAssemblerTests extends AbstractJmxAssembler
assertFalse(attr.isWritable());
}
public void testSetNameParameterIsNamed() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
MBeanOperationInfo operationSetAge = info.getOperation("setName");
assertEquals("name", operationSetAge.getSignature()[0].getName());
}
@Override
protected String getApplicationContextPath() {
return "org/springframework/jmx/export/assembler/methodNameAssembler.xml";