Search in sources :

Example 16 with SubordinateTrigger

use of com.github.bordertech.wcomponents.SubordinateTrigger in project wcomponents by BorderTech.

the class GreaterThan_Test method testConstructor.

@Test
public void testConstructor() {
    SubordinateTrigger trigger = new MyTrigger();
    Object value = new Object();
    GreaterThan compare = new GreaterThan(trigger, value);
    Assert.assertEquals("Value for GreaterThan is incorrect", value, compare.getValue());
    Assert.assertEquals("Trigger for GreaterThan should be the trigger", trigger, compare.getTrigger());
}
Also used : SubordinateTrigger(com.github.bordertech.wcomponents.SubordinateTrigger) Test(org.junit.Test)

Example 17 with SubordinateTrigger

use of com.github.bordertech.wcomponents.SubordinateTrigger in project wcomponents by BorderTech.

the class LessThanOrEqual_Test method testConstructor.

@Test
public void testConstructor() {
    SubordinateTrigger trigger = new MyTrigger();
    Object value = new Object();
    LessThanOrEqual compare = new LessThanOrEqual(trigger, value);
    Assert.assertEquals("Value for LessThanOrEqual is incorrect", value, compare.getValue());
    Assert.assertEquals("Trigger for LessThanOrEqual should be the trigger", trigger, compare.getTrigger());
}
Also used : SubordinateTrigger(com.github.bordertech.wcomponents.SubordinateTrigger) Test(org.junit.Test)

Example 18 with SubordinateTrigger

use of com.github.bordertech.wcomponents.SubordinateTrigger in project wcomponents by BorderTech.

the class LessThan_Test method testConstructor.

@Test
public void testConstructor() {
    SubordinateTrigger trigger = new MyTrigger();
    Object value = new Object();
    LessThan compare = new LessThan(trigger, value);
    Assert.assertEquals("Value for LessThan is incorrect", value, compare.getValue());
    Assert.assertEquals("Trigger for LessThan should be the trigger", trigger, compare.getTrigger());
}
Also used : SubordinateTrigger(com.github.bordertech.wcomponents.SubordinateTrigger) Test(org.junit.Test)

Example 19 with SubordinateTrigger

use of com.github.bordertech.wcomponents.SubordinateTrigger in project wcomponents by BorderTech.

the class Match_Test method testConstructor.

@Test
public void testConstructor() {
    SubordinateTrigger trigger = new MyTrigger();
    String value = "Test";
    Match compare = new Match(trigger, value);
    Assert.assertEquals("Value for Match is incorrect", value, compare.getValue());
    Assert.assertEquals("Trigger for Match should be the trigger", trigger, compare.getTrigger());
}
Also used : SubordinateTrigger(com.github.bordertech.wcomponents.SubordinateTrigger) Test(org.junit.Test)

Example 20 with SubordinateTrigger

use of com.github.bordertech.wcomponents.SubordinateTrigger in project wcomponents by BorderTech.

the class CompareExpression_Test method testConstructor.

@Test
public void testConstructor() {
    SubordinateTrigger trigger = new WTextField();
    String value = "test";
    CompareExpression expr = new CompareExpression(CompareType.MATCH, trigger, value);
    Assert.assertEquals("Incorrect type", CompareType.MATCH, expr.getType());
    Assert.assertEquals("Incorrect trigger", trigger, expr.getTrigger());
    Assert.assertEquals("Incorrect value", value, expr.getValue());
}
Also used : SubordinateTrigger(com.github.bordertech.wcomponents.SubordinateTrigger) WTextField(com.github.bordertech.wcomponents.WTextField) Test(org.junit.Test)

Aggregations

SubordinateTrigger (com.github.bordertech.wcomponents.SubordinateTrigger)23 Test (org.junit.Test)23 WTextField (com.github.bordertech.wcomponents.WTextField)14 Equal (com.github.bordertech.wcomponents.subordinate.Equal)12 GreaterThanOrEqual (com.github.bordertech.wcomponents.subordinate.GreaterThanOrEqual)12 LessThanOrEqual (com.github.bordertech.wcomponents.subordinate.LessThanOrEqual)12 NotEqual (com.github.bordertech.wcomponents.subordinate.NotEqual)12 SubordinateTarget (com.github.bordertech.wcomponents.SubordinateTarget)11 WContainer (com.github.bordertech.wcomponents.WContainer)11 Rule (com.github.bordertech.wcomponents.subordinate.Rule)11 WSubordinateControl (com.github.bordertech.wcomponents.subordinate.WSubordinateControl)11 WCheckBox (com.github.bordertech.wcomponents.WCheckBox)10 Hide (com.github.bordertech.wcomponents.subordinate.Hide)8 Show (com.github.bordertech.wcomponents.subordinate.Show)8 WComponentGroup (com.github.bordertech.wcomponents.WComponentGroup)6 Condition (com.github.bordertech.wcomponents.subordinate.Condition)4 And (com.github.bordertech.wcomponents.subordinate.And)3 WNumberField (com.github.bordertech.wcomponents.WNumberField)2 GreaterThan (com.github.bordertech.wcomponents.subordinate.GreaterThan)2 LessThan (com.github.bordertech.wcomponents.subordinate.LessThan)2