Package management.testclasses

Examples of management.testclasses.DummyNotificationListener


   * Test sending a normal notification
   */
  @Test
  public void sendGenericNotification() {
    manager.sendNotification(new DefaultNotification("Test Message"));
    DummyNotificationListener listener = Beans.getReference(DummyNotificationListener.class);
    Assert.assertEquals("Test Message", listener.getMessage());
  }
View Full Code Here


  @Test
  public void sendAttributeChangeNotification() {
    Notification n = new DefaultNotification( new AttributeChangeMessage("Test Message", "attribute", String.class, "old", "new") );
    manager.sendNotification(n);
   
    DummyNotificationListener listener = Beans.getReference(DummyNotificationListener.class);
    Assert.assertEquals("Test Message - attribute", listener.getMessage());
  }
View Full Code Here

        manager.setProperty(type, "id", new Integer(10));
        break;
      }
    }

    DummyNotificationListener listener = Beans.getReference(DummyNotificationListener.class);
    Assert.assertEquals(
        bundle.getString("management-notification-attribute-changed", "id",
            DummyManagedClass.class.getCanonicalName())
            + " - id", listener.getMessage());
  }
View Full Code Here

TOP

Related Classes of management.testclasses.DummyNotificationListener

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.