Package uk.co.blackpepper.mock.jmx

Examples of uk.co.blackpepper.mock.jmx.MockMBeanServerConnection


   * Test method for {@link uk.co.blackpepper.test.stats.data.jmx.JMXAttributeStatisticTest#init()}.
   */
  @Test
  public void testInitObjectName() {
    statistic.setAttributeName(TEST_ATTRIBUTE_NAME);
    statistic.setConnection(new MockMBeanServerConnection());
    statistic.setName(NAME);
    statistic.setFormatString(FORMAT);
    try {
      statistic.init();
      fail("Expected IllegalStateException.");
View Full Code Here


  /**
   * Test method for {@link uk.co.blackpepper.test.stats.data.jmx.JMXAttributeStatisticTest#setConnection(javax.management.MBeanServerConnection)}.
   */
  @Test
  public void testSetConnection() {
    statistic.setConnection(new MockMBeanServerConnection() {
      public Object getAttribute(
          final ObjectName name,
          final String attribute) {
        return INT_VALUE;
      }     
View Full Code Here

  /**
   * Test method for {@link uk.co.blackpepper.test.stats.data.jmx.JMXAttributeStatisticTest#setAttributeName(java.lang.String)}.
   */
  @Test
  public void testSetAttributeName() {
    statistic.setConnection(new MockMBeanServerConnection() {
      public Object getAttribute(
          final ObjectName name,
          final String attribute) {
        assertEquals("Attribute name not set or passed correctly.", TEST_ATTRIBUTE_NAME, attribute);
        return INT_VALUE;
View Full Code Here

  /**
   * Test method for {@link uk.co.blackpepper.test.stats.data.jmx.JMXAttributeStatisticTest#setObjectName(java.lang.String)}.
   */
  @Test
  public void testSetObjectName() {
    statistic.setConnection(new MockMBeanServerConnection() {
      public Object getAttribute(
          final ObjectName name,
          final String attribute) {
        try {
          final ObjectName testName = new ObjectName(TEST_OBJECT_NAME);
View Full Code Here

TOP

Related Classes of uk.co.blackpepper.mock.jmx.MockMBeanServerConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.