use of org.apache.tapestry5.integration.app1.data.IntegerHolder in project tapestry-5 by apache.
the class PropertyConduitSourceImplTest method not_operator.
@Test
public void not_operator() {
PropertyConduit conduit = source.create(IntegerHolder.class, "! value");
IntegerHolder holder = new IntegerHolder();
assertEquals(conduit.get(holder), Boolean.TRUE);
holder.setValue(99);
assertEquals(conduit.get(holder), Boolean.FALSE);
}
use of org.apache.tapestry5.integration.app1.data.IntegerHolder in project tapestry-5 by apache.
the class PropertyConduitSourceImplTest method range_variable_from.
@Test
public void range_variable_from() {
PropertyConduit pc = source.create(IntegerHolder.class, "value..99");
IntegerHolder h = new IntegerHolder();
h.setValue(72);
IntegerRange ir = (IntegerRange) pc.get(h);
assertEquals(ir, new IntegerRange(72, 99));
}
use of org.apache.tapestry5.integration.app1.data.IntegerHolder in project tapestry-5 by apache.
the class PropertyConduitSourceImplTest method range_variable_to.
@Test
public void range_variable_to() {
PropertyConduit pc = source.create(IntegerHolder.class, "10..value");
IntegerHolder h = new IntegerHolder();
h.setValue(5);
IntegerRange ir = (IntegerRange) pc.get(h);
assertEquals(ir, new IntegerRange(10, 5));
}
Aggregations