Search in sources :

Example 1 with VisibleWidget

use of org.csstudio.display.builder.model.widgets.VisibleWidget in project org.csstudio.display.builder by kasemir.

the class WidgetPropertyUnitTest method testCommonWidgetProperty.

/**
 * Check common widget properties
 */
@Test
public void testCommonWidgetProperty() {
    final Widget widget = new VisibleWidget("generic");
    System.out.println(widget);
    widget.setPropertyValue(propName, "test1");
    assertThat(widget.getName(), equalTo("test1"));
    assertThat(widget.getProperty(propName).getValue(), equalTo("test1"));
    assertThat(widget.getProperty("name").getValue(), instanceOf(String.class));
    assertThat(widget.getProperty("x").getValue(), instanceOf(Integer.class));
    assertThat(widget.getProperty("visible").getValue(), instanceOf(Boolean.class));
}
Also used : VisibleWidget(org.csstudio.display.builder.model.widgets.VisibleWidget) TextUpdateWidget(org.csstudio.display.builder.model.widgets.TextUpdateWidget) LabelWidget(org.csstudio.display.builder.model.widgets.LabelWidget) VisibleWidget(org.csstudio.display.builder.model.widgets.VisibleWidget) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Test(org.junit.Test)

Aggregations

LabelWidget (org.csstudio.display.builder.model.widgets.LabelWidget)1 TextUpdateWidget (org.csstudio.display.builder.model.widgets.TextUpdateWidget)1 VisibleWidget (org.csstudio.display.builder.model.widgets.VisibleWidget)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 Test (org.junit.Test)1