use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class DisableInGroup_Test method testToString.
@Test
public void testToString() {
SubordinateTarget target1 = new MyTarget();
SubordinateTarget target2 = new MyTarget();
SubordinateTarget target3 = new MyTarget();
WComponentGroup<SubordinateTarget> group = new WComponentGroup<>();
group.addToGroup(target1);
group.addToGroup(target2);
group.addToGroup(target3);
DisableInGroup action = new DisableInGroup(target2, group);
Assert.assertEquals("Incorrect toString for action", "disable MyTarget in WComponentGroup([MyTarget, MyTarget, MyTarget])", action.toString());
new WLabel("test label", target2);
Assert.assertEquals("Incorrect toString for action with a label", "disable test label in WComponentGroup([MyTarget, MyTarget, MyTarget])", action.toString());
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class Equal_Test method testToString.
@Test
public void testToString() {
MyTrigger trigger = new MyTrigger();
Equal compare = new Equal(trigger, "1");
Assert.assertEquals("Incorrect toString for compare", "MyTrigger=\"1\"", compare.toString());
WLabel label = new WLabel("test label", trigger);
Assert.assertEquals("Incorrect toString for compare with a label", label.getText() + "=\"1\"", compare.toString());
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class GreaterThan_Test method testToString.
@Test
public void testToString() {
MyTrigger trigger = new MyTrigger();
GreaterThan compare = new GreaterThan(trigger, "1");
Assert.assertEquals("Incorrect toString for compare", "MyTrigger>\"1\"", compare.toString());
WLabel label = new WLabel("test label", trigger);
Assert.assertEquals("Incorrect toString for compare with a label", label.getText() + ">\"1\"", compare.toString());
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class HideInGroup_Test method testToString.
@Test
public void testToString() {
SubordinateTarget target1 = new MyTarget();
SubordinateTarget target2 = new MyTarget();
SubordinateTarget target3 = new MyTarget();
WComponentGroup<SubordinateTarget> group = new WComponentGroup<>();
group.addToGroup(target1);
group.addToGroup(target2);
group.addToGroup(target3);
HideInGroup action = new HideInGroup(target2, group);
Assert.assertEquals("Incorrect toString for action", "hide MyTarget in WComponentGroup([MyTarget, MyTarget, MyTarget])", action.toString());
new WLabel("test label", target2);
Assert.assertEquals("Incorrect toString for action with a label", "hide test label in WComponentGroup([MyTarget, MyTarget, MyTarget])", action.toString());
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class LessThanOrEqual_Test method testToString.
@Test
public void testToString() {
MyTrigger trigger = new MyTrigger();
LessThanOrEqual compare = new LessThanOrEqual(trigger, "1");
Assert.assertEquals("Incorrect toString for compare", "MyTrigger<=\"1\"", compare.toString());
WLabel label = new WLabel("test label", trigger);
Assert.assertEquals("Incorrect toString for compare with a label", label.getText() + "<=\"1\"", compare.toString());
}
Aggregations