Class CliAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<CliAssert,CLI>
ubic.gemma.cli.util.test.CliAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<CliAssert,CLI>, org.assertj.core.api.Descriptable<CliAssert>, org.assertj.core.api.ExtensionPoints<CliAssert,CLI>

public class CliAssert extends org.assertj.core.api.AbstractAssert<CliAssert,CLI>
  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.assertj.core.api.ThrowableAssert<Exception>
     
    Assert that the command fails.
    failsWith(int exitStatus)
    Assert that the command fails with the given exit status.
    org.assertj.core.api.ByteArrayAssert
     
    org.assertj.core.api.ByteArrayAssert
     
    Asserts that the command succeeds with a zero exit status.
    withArguments(String... arguments)
    Set the arguments passed to the command.
    withCommandNameOrAlias(String commandNameOrAlias)
    Set the command name or alias used to execute the command.
    Set the console to be used for interactive use.
    Set the environment variables to be used when executing the command.
     
    Set the input stream to be used as standard input for the command.
     

    Methods inherited from class org.assertj.core.api.AbstractAssert

    actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs, describedAs
  • Constructor Details

    • CliAssert

      public CliAssert(CLI cli)
  • Method Details

    • withCommandNameOrAlias

      public CliAssert withCommandNameOrAlias(String commandNameOrAlias)
      Set the command name or alias used to execute the command.
    • withArguments

      public CliAssert withArguments(String... arguments)
      Set the arguments passed to the command.
    • withEnvironment

      public CliAssert withEnvironment(Map<String,String> environment)
      Set the environment variables to be used when executing the command.
    • withConsole

      public CliAssert withConsole(Console console)
      Set the console to be used for interactive use.
    • withInputStream

      public CliAssert withInputStream(InputStream inputStream)
      Set the input stream to be used as standard input for the command.
    • withOutputStream

      public CliAssert withOutputStream(OutputStream outputStream)
    • withErrorStream

      public CliAssert withErrorStream(OutputStream errorStream)
    • succeeds

      public CliAssert succeeds()
      Asserts that the command succeeds with a zero exit status.
    • fails

      public CliAssert fails()
      Assert that the command fails.
    • failsWith

      public CliAssert failsWith(int exitStatus)
      Assert that the command fails with the given exit status.
    • exitCause

      public org.assertj.core.api.ThrowableAssert<Exception> exitCause()
    • standardOutput

      public org.assertj.core.api.ByteArrayAssert standardOutput()
    • standardError

      public org.assertj.core.api.ByteArrayAssert standardError()