Search in sources :

Example 11 with SubordinateTarget

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);
}
Also used : SubordinateTarget(com.github.bordertech.wcomponents.SubordinateTarget) WComponentGroup(com.github.bordertech.wcomponents.WComponentGroup) WTextField(com.github.bordertech.wcomponents.WTextField) Test(org.junit.Test)

Example 12 with SubordinateTarget

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());
}
Also used : SubordinateTarget(com.github.bordertech.wcomponents.SubordinateTarget) Test(org.junit.Test)

Example 13 with SubordinateTarget

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());
}
Also used : SubordinateTarget(com.github.bordertech.wcomponents.SubordinateTarget) WComponentGroup(com.github.bordertech.wcomponents.WComponentGroup) Test(org.junit.Test)

Example 14 with SubordinateTarget

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);
}
Also used : SubordinateTarget(com.github.bordertech.wcomponents.SubordinateTarget) WComponentGroup(com.github.bordertech.wcomponents.WComponentGroup) WTextField(com.github.bordertech.wcomponents.WTextField) Test(org.junit.Test)

Example 15 with SubordinateTarget

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());
}
Also used : SubordinateTarget(com.github.bordertech.wcomponents.SubordinateTarget) Test(org.junit.Test)

Aggregations

SubordinateTarget (com.github.bordertech.wcomponents.SubordinateTarget)57 Test (org.junit.Test)53 WComponentGroup (com.github.bordertech.wcomponents.WComponentGroup)30 WTextField (com.github.bordertech.wcomponents.WTextField)21 WCheckBox (com.github.bordertech.wcomponents.WCheckBox)18 Equal (com.github.bordertech.wcomponents.subordinate.Equal)17 Rule (com.github.bordertech.wcomponents.subordinate.Rule)17 WSubordinateControl (com.github.bordertech.wcomponents.subordinate.WSubordinateControl)17 WContainer (com.github.bordertech.wcomponents.WContainer)15 GreaterThanOrEqual (com.github.bordertech.wcomponents.subordinate.GreaterThanOrEqual)15 LessThanOrEqual (com.github.bordertech.wcomponents.subordinate.LessThanOrEqual)15 NotEqual (com.github.bordertech.wcomponents.subordinate.NotEqual)15 Hide (com.github.bordertech.wcomponents.subordinate.Hide)12 SubordinateTrigger (com.github.bordertech.wcomponents.SubordinateTrigger)11 Show (com.github.bordertech.wcomponents.subordinate.Show)11 WLabel (com.github.bordertech.wcomponents.WLabel)5 Condition (com.github.bordertech.wcomponents.subordinate.Condition)5 WHorizontalRule (com.github.bordertech.wcomponents.WHorizontalRule)3 And (com.github.bordertech.wcomponents.subordinate.And)3 Disable (com.github.bordertech.wcomponents.subordinate.Disable)3