use of com.github.bordertech.wcomponents.SubordinateTarget in project wcomponents by BorderTech.
the class HideInGroup_Test method testActionType.
@Test
public void testActionType() {
SubordinateTarget target = new WTextField();
WComponentGroup<SubordinateTarget> group = new WComponentGroup<>();
group.addToGroup(target);
HideInGroup action = new HideInGroup(target, group);
Assert.assertEquals("Incorrect Action Type", action.getActionType(), AbstractAction.ActionType.HIDEIN);
}
use of com.github.bordertech.wcomponents.SubordinateTarget in project wcomponents by BorderTech.
the class Mandatory_Test method testConstructor.
@Test
public void testConstructor() {
SubordinateTarget target = new MyTarget();
Mandatory action = new Mandatory(target);
Assert.assertEquals("Value for Mandatory should be true", Boolean.TRUE, action.getValue());
Assert.assertEquals("Target for Mandatory should be the target", target, action.getTarget());
}
use of com.github.bordertech.wcomponents.SubordinateTarget in project wcomponents by BorderTech.
the class ShowInGroup_Test method testConstructor.
@Test
public void testConstructor() {
SubordinateTarget target = new MyTarget();
WComponentGroup<SubordinateTarget> group = new WComponentGroup<>();
ShowInGroup action = new ShowInGroup(target, group);
Assert.assertEquals("Value for ShowIn should be false", Boolean.FALSE, action.getValue());
Assert.assertEquals("Target for ShowIn should be the group", group, action.getTarget());
Assert.assertEquals("TargetInGroup for ShowIn should be the target", target, action.getTargetInGroup());
}
use of com.github.bordertech.wcomponents.SubordinateTarget in project wcomponents by BorderTech.
the class ShowInGroup_Test method testActionType.
@Test
public void testActionType() {
SubordinateTarget target = new WTextField();
WComponentGroup<SubordinateTarget> group = new WComponentGroup<>();
group.addToGroup(target);
ShowInGroup action = new ShowInGroup(target, group);
Assert.assertEquals("Incorrect Action Type", action.getActionType(), AbstractAction.ActionType.SHOWIN);
}
use of com.github.bordertech.wcomponents.SubordinateTarget in project wcomponents by BorderTech.
the class Show_Test method testConstructor.
@Test
public void testConstructor() {
SubordinateTarget target = new MyTarget();
Show action = new Show(target);
Assert.assertEquals("Value for Show should be true", Boolean.TRUE, action.getValue());
Assert.assertEquals("Target for Show should be the target", target, action.getTarget());
}
Aggregations