// Initialiser le device et le composant
initFirstDevice();
int data[] = readImageAttribute(m_deviceProxy, attributeName);
final AttributeImagePanelCometeV2 widget = new AttributeImagePanelCometeV2.Builder(
m_deviceName, attributeName).alarmEnable(false).jframe(jf1)
.confirmation(false).build();
Sleeper.SECONDS.sleep(2);
final Object numberMatrix = widget.getData();
Assert.assertTrue("Widget does'nt reflect image attribute",
equality(numberMatrix, data));
// modifier la valeur de l'attribut
for (int i = 0; i < data.length; i++) {
data[i] += i;
}
m_deviceProxy.write_attribute(new DeviceAttribute(attributeName, data,
widget.getDimX(), widget.getDimY()));
Sleeper.SECONDS.sleep(2);
Assert.assertTrue("Widget does'nt reflect image attribute",
equality(widget.getData(), data));
// Faire varier le nom de l'attribut
attributeName = "int_image_ro";
data = readImageAttribute(m_deviceProxy2, attributeName);
widget.setAttributeName(attributeName);
Sleeper.SECONDS.sleep(2);
Assert.assertTrue("Widget does'nt reflect image attribute",
equality(widget.getData(), data));
// Faire varier le nom du device
initSecondDevice();
data = readImageAttribute(m_deviceProxy2, attributeName);
widget.setDeviceName(m_deviceName2);
Sleeper.SECONDS.sleep(2);
// TODO
// le changement de device ne fonctionne pas
// Assert.assertTrue("Widget does'nt reflect image attribute",equality(widget.getData(),data));
// clean
widget.stop();
jf1.dispose();
}