use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testInvokeUnexposedMethodWithException.
@Test(expected = InvalidInvocationException.class)
public void testInvokeUnexposedMethodWithException() throws Exception {
assumeTrue(runTests);
IJmxTestBean bean = getProxy();
bean.dontExposeMe();
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testSetAttributeValueWithCheckedException.
@Test(expected = ClassNotFoundException.class)
public void testSetAttributeValueWithCheckedException() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
proxy.setName("Juergen Class");
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testGetAttributeValue.
@Test
public void testGetAttributeValue() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy1 = getProxy();
int age = proxy1.getAge();
assertEquals("The age should be 100", 100, age);
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testProxyClassIsDifferent.
@Test
public void testProxyClassIsDifferent() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
assertTrue("The proxy class should be different than the base class", (proxy.getClass() != IJmxTestBean.class));
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method testInvokeArgs.
@Test
public void testInvokeArgs() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
int result = proxy.add(1, 2);
assertEquals("The operation should return 3", 3, result);
}
Aggregations