Package fr.soleil.util

Examples of fr.soleil.util.ScalarAttributeListenerImpl


    }

    private void controlReadStringValueChange(final DeviceProxy devProx,
            final StringScalarPanel widget, final String value, final String attName)
            throws DevFailed {
        final ScalarAttributeListenerImpl listenerTest = new ScalarAttributeListenerImpl();
        widget.addScalarAttributeListener(listenerTest);

        devProx.write_attribute(new DeviceAttribute(attName, value));

        assertTrue(listenerTest.isLaterNotified("readStringValueChange", 5000L));
        assertTrue(value.equals(listenerTest.getNotification("readStringValueChange")));

        // v�rifier que le remove du listener est correctement trait�
        widget.removeScalarAttributeListener(listenerTest);
        listenerTest.reset();

        devProx.write_attribute(new DeviceAttribute(attName, value + value));

        assertFalse(listenerTest.isLaterNotified("readStringValueChange", 5000L));
    }
View Full Code Here


  }

  private void controlReadStringValueChange(final DeviceProxy devProx,
      final StringScalarPanel widget, final String value,
      final String attName) throws DevFailed {
    final ScalarAttributeListenerImpl listenerTest = new ScalarAttributeListenerImpl();
    widget.addScalarAttributeListener(listenerTest);

    devProx.write_attribute(new DeviceAttribute(attName, value));

    assertTrue(listenerTest.isLaterNotified("readStringValueChange", 5000L));
    assertTrue(value.equals(listenerTest
        .getNotification("readStringValueChange")));

    // v�rifier que le remove du listener est correctement trait�
    widget.removeScalarAttributeListener(listenerTest);
    listenerTest.reset();

    devProx.write_attribute(new DeviceAttribute(attName, value + value));

    assertFalse(listenerTest
        .isLaterNotified("readStringValueChange", 5000L));
  }
View Full Code Here

  }

  private void controlReadDoubleValueChange(final DeviceProxy devProx,
      final NumberScalarFieldCometeV2 widget, final Double value,
      final String attName) throws DevFailed {
    final ScalarAttributeListenerImpl listenerTest = new ScalarAttributeListenerImpl();
    widget.addScalarAttributeListener(listenerTest);

    devProx.write_attribute(new DeviceAttribute(attName, value));

    assertTrue("Notification never called",
        listenerTest.isLaterNotified("readNumberValueChange", 5000L));
    assertTrue("Notification value different from original",
        value.equals(listenerTest
            .getNotification("readNumberValueChange")));

    // v�rifier que le remove du listener est correctement trait�
    widget.removeScalarAttributeListener(listenerTest);
    listenerTest.reset();

    devProx.write_attribute(new DeviceAttribute(attName, value + value));

    assertFalse(listenerTest
        .isLaterNotified("readNumberValueChange", 5000L));
  }
View Full Code Here

  }

  private void controlReadDoubleValueChange(final DeviceProxy devProx,
      final NumberScalarFieldCometeV2 widget, final Double value,
      final String attName) throws DevFailed {
    final ScalarAttributeListenerImpl listenerTest = new ScalarAttributeListenerImpl();
    widget.addScalarAttributeListener(listenerTest);

    devProx.write_attribute(new DeviceAttribute(attName, value));

    assertTrue("Notification never called",
        listenerTest.isLaterNotified("readNumberValueChange", 5000L));
    assertTrue("Notification value different from original",
        value.equals(listenerTest
            .getNotification("readNumberValueChange")));

    // v�rifier que le remove du listener est correctement trait�
    widget.removeScalarAttributeListener(listenerTest);
    listenerTest.reset();

    devProx.write_attribute(new DeviceAttribute(attName, value + value));

    assertFalse(listenerTest
        .isLaterNotified("readNumberValueChange", 5000L));
  }
View Full Code Here

TOP

Related Classes of fr.soleil.util.ScalarAttributeListenerImpl

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.