Polish tests

This commit is contained in:
Sam Brannen
2015-08-12 19:35:45 +02:00
parent f15140415a
commit f47bbb0d9e
3 changed files with 25 additions and 44 deletions

View File

@@ -30,25 +30,21 @@ import static org.junit.Assert.*;
public class JmxUtilsAnnotationTests {
@Test
public void testNotMXBean() throws Exception {
FooNotX foo = new FooNotX();
assertFalse("MXBean annotation not detected correctly", JmxUtils.isMBean(foo.getClass()));
public void notMXBean() throws Exception {
assertFalse("MXBean annotation not detected correctly", JmxUtils.isMBean(FooNotX.class));
}
@Test
public void testAnnotatedMXBean() throws Exception {
FooX foo = new FooX();
assertTrue("MXBean annotation not detected correctly", JmxUtils.isMBean(foo.getClass()));
@Test
public void annotatedMXBean() throws Exception {
assertTrue("MXBean annotation not detected correctly", JmxUtils.isMBean(FooX.class));
}
@MXBean(false)
public interface FooNotMXBean {
String getName();
}
public static class FooNotX implements FooNotMXBean {
@Override
@@ -57,14 +53,11 @@ public class JmxUtilsAnnotationTests {
}
}
@MXBean(true)
public interface FooIfc {
String getName();
}
public static class FooX implements FooIfc {
@Override