This task supports boolean logic as well as pluggable conditions to decide, whether a property should be set.
This task does not extend Task to take advantage of ConditionBase.
596061626364656667
@Test public void testConditionTask() { buildRule.executeTarget("testConditionTask"); TaskAdapter ta = (TaskAdapter) buildRule.getProject().getReference("cond"); ConditionTask c = (ConditionTask) ta.getProxy(); assertFalse(c.getLocation() == Location.UNKNOWN_LOCATION); assertFalse(c.getLocation().getLineNumber() == 0); }
454647484950515253
} public void testConditionTask() { executeTarget("testConditionTask"); TaskAdapter ta = (TaskAdapter) getProject().getReference("cond"); ConditionTask c = (ConditionTask) ta.getProxy(); assertFalse(c.getLocation() == Location.UNKNOWN_LOCATION); assertFalse(c.getLocation().getLineNumber() == 0); }