use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class Disable_Test method testToString.
@Test
public void testToString() {
MyTarget target = new MyTarget();
Disable action = new Disable(target);
Assert.assertEquals("Incorrect toString for action", "disable MyTarget", action.toString());
WLabel label = new WLabel("test label", target);
Assert.assertEquals("Incorrect toString for action with a label", "disable " + label.getText(), action.toString());
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class EnableInGroup_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);
EnableInGroup action = new EnableInGroup(target2, group);
Assert.assertEquals("Incorrect toString for action", "enable MyTarget in WComponentGroup([MyTarget, MyTarget, MyTarget])", action.toString());
new WLabel("test label", target2);
Assert.assertEquals("Incorrect toString for action with a label", "enable test label in WComponentGroup([MyTarget, MyTarget, MyTarget])", action.toString());
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class Enable_Test method testToString.
@Test
public void testToString() {
MyTarget target = new MyTarget();
Enable action = new Enable(target);
Assert.assertEquals("Incorrect toString for action", "enable MyTarget", action.toString());
WLabel label = new WLabel("test label", target);
Assert.assertEquals("Incorrect toString for action with a label", "enable " + label.getText(), action.toString());
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class GreaterThanOrEqual_Test method testToString.
@Test
public void testToString() {
MyTrigger trigger = new MyTrigger();
GreaterThanOrEqual compare = new GreaterThanOrEqual(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 Hide_Test method testToString.
@Test
public void testToString() {
MyTarget target = new MyTarget();
Hide action = new Hide(target);
Assert.assertEquals("Incorrect toString for action", "hide MyTarget", action.toString());
WLabel label = new WLabel("test label", target);
Assert.assertEquals("Incorrect toString for action with a label", "hide " + label.getText(), action.toString());
}
Aggregations