Examples of StandardOutputListener


Examples of org.gradle.api.logging.StandardOutputListener

        }
        return this;
    }

    public OutputEventRenderer addStandardOutput(final Appendable out) {
        addStandardOutputListener(new StandardOutputListener() {
            public void onOutput(CharSequence output) {
                try {
                    out.append(output);
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        });
        return this;
    }

    public OutputEventRenderer addStandardError(final Appendable err) {
        addStandardErrorListener(new StandardOutputListener() {
            public void onOutput(CharSequence output) {
                try {
                    err.append(output);
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

    /**
     * Creates a text output which writes text to the given appendable.
     * @param appendable The appendable.
     */
    public StreamingStyledTextOutput(final Appendable appendable) {
        this(appendable, new StandardOutputListener() {
            public void onOutput(CharSequence output) {
                try {
                    appendable.append(output);
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        loggingManager.stop();
    }

    @Test
    public void addsListenersOnStartAndRemovesOnStop() {
        final StandardOutputListener stdoutListener = context.mock(StandardOutputListener.class);
        final StandardOutputListener stderrListener = context.mock(StandardOutputListener.class);

        loggingManager.addStandardOutputListener(stdoutListener);
        loggingManager.addStandardErrorListener(stderrListener);

        context.checking(new Expectations() {{
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        loggingManager.stop();
    }

    @Test
    public void addsListenersWhileStarted() {
        final StandardOutputListener stdoutListener = context.mock(StandardOutputListener.class);
        final StandardOutputListener stderrListener = context.mock(StandardOutputListener.class);

        context.checking(new Expectations() {{
            ignoring(loggingSystem);
            ignoring(stdOutLoggingSystem);
            ignoring(stdErrLoggingSystem);
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        loggingManager.addStandardErrorListener(stderrListener);
    }

    @Test
    public void removesListenersWhileStarted() {
        final StandardOutputListener stdoutListener = context.mock(StandardOutputListener.class);
        final StandardOutputListener stderrListener = context.mock(StandardOutputListener.class);

        loggingManager.addStandardOutputListener(stdoutListener);
        loggingManager.addStandardErrorListener(stderrListener);

        context.checking(new Expectations() {{
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        processor.started(test, event);
        if (suite != null) {
            return;
        }
        suite = test.getId();
        outputRedirector.redirectStandardOutputTo(new StandardOutputListener() {
            public void onOutput(CharSequence output) {
                processor.output(suite, new TestOutputEvent(TestOutputEvent.Destination.StdOut, output.toString()));
            }
        });
        outputRedirector.redirectStandardErrorTo(new StandardOutputListener() {
            public void onOutput(CharSequence output) {
                processor.output(suite, new TestOutputEvent(TestOutputEvent.Destination.StdErr, output.toString()));
            }
        });
        outputRedirector.start();
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        loggingManager.stop();
    }

    @Test
    public void addsStdOutputListenerOnStartAndRemovesOnStop() {
        final StandardOutputListener stdoutListener = context.mock(StandardOutputListener.class);

        loggingManager.addStandardOutputListener(stdoutListener);

        context.checking(new Expectations() {{
            ignoring(loggingSystem);
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        loggingManager.stop();
    }

    @Test
    public void addsStdErrorListenerOnStartAndRemovesOnStop() {
        final StandardOutputListener stderrListener = context.mock(StandardOutputListener.class);

        loggingManager.addStandardErrorListener(stderrListener);

        context.checking(new Expectations() {{
            ignoring(loggingSystem);
View Full Code Here

Examples of org.gradle.api.logging.StandardOutputListener

        loggingManager.stop();
    }

    @Test
    public void addsStdOutputListenerWhileStarted() {
        final StandardOutputListener stdoutListener = context.mock(StandardOutputListener.class);

        context.checking(new Expectations() {{
            ignoring(loggingSystem);
            ignoring(stdOutLoggingSystem);
            ignoring(stdErrLoggingSystem);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.