All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pantsbuild.tools.junit.impl.StreamSource Maven / Gradle / Ivy

Go to download

A command line tool for running junit tests that provides functionality above and beyond that provided by org.junit.runner.JUnitCore.

There is a newer version: 1.0.30
Show newest version
// Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).

package org.pantsbuild.tools.junit.impl;

import java.io.IOException;

/**
 * Provides contents of the output streams captured from a test class run.
 */
interface StreamSource {

  /**
   * Returns the contents of STDOUT from a test class run.
   *
   * @param testClass The test class to retrieve captured output for.
   * @return The captured STDOUT stream.
   * @throws IOException If there is a problem retrieving the output.
   */
  byte[] readOut(Class testClass) throws IOException;

  /**
   * Returns the contents of STDERR from a test class run.
   *
   * @param testClass The test class to retrieve captured output for.
   * @return The captured STDERR stream.
   * @throws IOException If there is a problem retrieving the output.
   */
  byte[] readErr(Class testClass) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy