Package org.apache.tools.ant

Examples of org.apache.tools.ant.Location


        IncludeTask include = (IncludeTask)ctrl.getMock();
        include.getProject();
        ctrl.setReturnValue(project, 2);
        include.maybeConfigure();
        include.getLocation();
        ctrl.setReturnValue(new Location(""));
        include.getNestedTask();
        ctrl.setReturnValue(nested, 1);
        include.execute();
        if (exception != null) {
            ctrl.setThrowable(exception);
View Full Code Here


        Task mockTask = (Task)taskCtrl.getMock();
        mockTask.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask.maybeConfigure();
        mockTask.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        mockTask.execute();
        taskCtrl.setThrowable(new TestSkippedException("foo", true));

        taskCtrl.replay();
        group.addTask(mockTask);
View Full Code Here

        Task mockTask = (Task)taskCtrl.getMock();
        mockTask.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask.maybeConfigure();
        mockTask.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        mockTask.execute();
        taskCtrl.setThrowable(new TestSkippedException("foo", true));

        taskCtrl.replay();
        group.addTask(mockTask);
View Full Code Here

        Task mockTask1 = (Task)taskCtrl.getMock();
        mockTask1.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask1.maybeConfigure();
        mockTask1.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        mockTask1.getTaskName();
        taskCtrl.setReturnValue("foo");
        mockTask1.execute();
        taskCtrl.setThrowable(new AssertionWarningException("XXX"));

        Task mockTask2 = (Task)taskCtrl.getMock();
        mockTask2.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask2.maybeConfigure();
        mockTask2.execute();

        Task mockTask3 = (Task)taskCtrl.getMock();
        mockTask3.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask3.maybeConfigure();
        mockTask3.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        mockTask3.execute();
        taskCtrl.setThrowable(new AssertionWarningException("XXX"));

        taskCtrl.replay();
        group.addTask(mockTask1);
View Full Code Here

        Task mockTask1 = (Task)taskCtrl.getMock();
        mockTask1.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask1.maybeConfigure();
        mockTask1.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        mockTask1.getTaskName();
        taskCtrl.setReturnValue("foo");
        mockTask1.execute();
        taskCtrl.setThrowable(new BuildException("XXX"));

        Task mockTask2 = (Task)taskCtrl.getMock();
        mockTask2.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask2.maybeConfigure();
        mockTask2.execute();

        Task mockTask3 = (Task)taskCtrl.getMock();
        mockTask3.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask3.maybeConfigure();
        mockTask3.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        mockTask3.execute();
        taskCtrl.setThrowable(new BuildException("XXX"));

        taskCtrl.replay();
        group.addTask(mockTask1);
View Full Code Here

        UnknownElement mockUke = (UnknownElement)ukeCtrl.getMock();
        mockUke.getProject();
        ukeCtrl.setReturnValue(project, 2);
        mockUke.maybeConfigure();
        mockUke.getLocation();
        ukeCtrl.setReturnValue(new Location(""));
        mockUke.getTask();
        ukeCtrl.setReturnValue(null);
        mockUke.execute();
        ukeCtrl.setThrowable(new BuildException());
View Full Code Here

        UnknownElement mockUke = (UnknownElement)ctrl.getMock();
        mockUke.getProject();
        ctrl.setReturnValue(project, 2);
        mockUke.maybeConfigure();
        mockUke.getLocation();
        ctrl.setReturnValue(new Location(""));
        mockUke.getTask();
        ctrl.setReturnValue(nested, 1);
        mockUke.execute();
        if (exception != null) {
            ctrl.setThrowable(exception);
View Full Code Here

   
    public void testExecuteVerifyFailure() throws Exception {
        MockControl prjCtrl = MockClassControl.createNiceControl(Project.class);
        Project project = (Project)prjCtrl.getMock();

        BuildException verifyExc = new BuildException("foo", new Location("bar"));
        MockControl vfyCtrl = MockClassControl.createNiceControl(ServiceVerifyTask.class);
        ServiceVerifyTask verify = (ServiceVerifyTask)vfyCtrl.getMock();
        verify.getProject();
        vfyCtrl.setReturnValue(project, 2);
        verify.execute();
View Full Code Here

        taskCtrl.setReturnValue(project, 2);
        task.maybeConfigure();
        task.execute();
        taskCtrl.setThrowable(new AssertionWarningException());
        task.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        task.getTaskName();
        taskCtrl.setReturnValue("foo");

        projectCtrl.replay();
        taskCtrl.replay();
View Full Code Here

        taskCtrl.setReturnValue(project, 2);
        task.maybeConfigure();
        task.execute();
        taskCtrl.setThrowable(new BuildException());
        task.getLocation();
        taskCtrl.setReturnValue(new Location(""));
        task.getTaskName();
        taskCtrl.setReturnValue("foo");

        projectCtrl.replay();
        taskCtrl.replay();
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.