use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testSetAttributeValue.
@Test
public void testSetAttributeValue() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
proxy.setName("Rob Harrop");
assertEquals("The name of the bean should have been updated", "Rob Harrop", target.getName());
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testSetAttributeValueWithIOException.
@Test(expected = IOException.class)
public void testSetAttributeValueWithIOException() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
proxy.setName("Juergen IO");
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testSetAttributeValueWithRuntimeException.
@Test(expected = IllegalArgumentException.class)
public void testSetAttributeValueWithRuntimeException() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
proxy.setName("Juergen");
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testDifferentProxiesSameClass.
@Test
public void testDifferentProxiesSameClass() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy1 = getProxy();
IJmxTestBean proxy2 = getProxy();
assertNotSame("The proxies should NOT be the same", proxy1, proxy2);
assertSame("The proxy classes should be the same", proxy1.getClass(), proxy2.getClass());
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class AbstractJmxAssemblerTests method testSetAttribute.
@Test
public void testSetAttribute() throws Exception {
ObjectName objectName = ObjectNameManager.getInstance(getObjectName());
getServer().setAttribute(objectName, new Attribute(NAME_ATTRIBUTE, "Rob Harrop"));
IJmxTestBean bean = (IJmxTestBean) getContext().getBean("testBean");
assertEquals("Rob Harrop", bean.getName());
}
Aggregations