use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method getAttributeValue.
@Test
void getAttributeValue() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy1 = getProxy();
int age = proxy1.getAge();
assertThat(age).as("The age should be 100").isEqualTo(100);
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method setAttributeValueWithCheckedException.
@Test
void setAttributeValueWithCheckedException() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
assertThatExceptionOfType(ClassNotFoundException.class).isThrownBy(() -> proxy.setName("Juergen Class"));
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method invokeArgs.
@Test
void invokeArgs() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
int result = proxy.add(1, 2);
assertThat(result).as("The operation should return 3").isEqualTo(3);
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method setAttributeValue.
@Test
void setAttributeValue() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
proxy.setName("Rob Harrop");
assertThat(target.getName()).as("The name of the bean should have been updated").isEqualTo("Rob Harrop");
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method invokeNoArgs.
@Test
void invokeNoArgs() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
long result = proxy.myOperation();
assertThat(result).as("The operation should return 1").isEqualTo(1);
}
Aggregations