use of org.apache.tools.ant.input.PropertyFileInputHandler in project ant by apache.
the class InputTest method setUp.
@Before
public void setUp() {
buildRule.configureProject("src/etc/testcases/taskdefs/input.xml");
System.getProperties().put(PropertyFileInputHandler.FILE_NAME_KEY, buildRule.getProject().resolveFile("input.properties").getAbsolutePath());
buildRule.getProject().setInputHandler(new PropertyFileInputHandler());
originalStdIn = System.in;
}
use of org.apache.tools.ant.input.PropertyFileInputHandler in project ant by apache.
the class AntTest method testInputHandlerInheritance.
@Test
public void testInputHandlerInheritance() {
InputHandler ih = new PropertyFileInputHandler();
buildRule.getProject().setInputHandler(ih);
InputHandlerChecker ic = new InputHandlerChecker(ih);
buildRule.getProject().addBuildListener(ic);
buildRule.executeTarget("tripleCall");
AssertionFailedError ae = ic.getError();
if (ae != null) {
throw ae;
}
buildRule.getProject().removeBuildListener(ic);
}
use of org.apache.tools.ant.input.PropertyFileInputHandler in project ant by apache.
the class ProjectTest method testInputHandler.
@Test
public void testInputHandler() {
InputHandler ih = p.getInputHandler();
assertNotNull(ih);
assertTrue(ih instanceof DefaultInputHandler);
InputHandler pfih = new PropertyFileInputHandler();
p.setInputHandler(pfih);
assertSame(pfih, p.getInputHandler());
}
Aggregations