Packages

trait Expectable[R] extends AnyRef

Source
Expectable.scala
Linear Supertypes
AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Expectable
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val expectableParent: Expect[R]
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Expectable[R] to any2stringadd[Expectable[R]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Expectable[R], B)
    Implicit
    This member is added by an implicit conversion from Expectable[R] to ArrowAssoc[Expectable[R]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def addExpectBlock(f: (Expect[R]) ⇒ Unit): Expect[R]

    Add arbitrary ExpectBlocks to this Expect.

    Add arbitrary ExpectBlocks to this Expect.

    This is helpful to refactor code. For example: imagine you have an error case you want to add to multiple expects. You could leverage this method to do so in the following way:

    def errorCaseExpectBlock(expect: Expect[String]): Unit {
      expect.expect
        .when("Some error")
          .returning("Got some error")
    }
    
    //Then in your expects
    def parseOutputA: Expect[String] = {
      val e = new Expect("some command", "")
      e.expect(...)
      e.expect
        .when(...)
          .action1
        .when(...)
          .action2
      e.addExpectBlock(errorCaseExpectBlock)
    }
    
    def parseOutputB: Expect[String] = {
      val e = new Expect("some command", "")
      e.expect
        .when(...)
          .action1
          .action2
        .when(...)
          .action1
      e.expect(...)
        .action2
      e.addExpectBlock(errorCaseExpectBlock)
    }
    f

    function that adds ExpectBlocks.

    returns

    this Expect.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def ensuring(cond: (Expectable[R]) ⇒ Boolean, msg: ⇒ Any): Expectable[R]
    Implicit
    This member is added by an implicit conversion from Expectable[R] to Ensuring[Expectable[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (Expectable[R]) ⇒ Boolean): Expectable[R]
    Implicit
    This member is added by an implicit conversion from Expectable[R] to Ensuring[Expectable[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): Expectable[R]
    Implicit
    This member is added by an implicit conversion from Expectable[R] to Ensuring[Expectable[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): Expectable[R]
    Implicit
    This member is added by an implicit conversion from Expectable[R] to Ensuring[Expectable[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def expect(pattern: Timeout.type): TimeoutWhen[R]

    Adds, in a new ExpectBlock, a TimeoutWhen that matches whenever the read from any of the FromStreamInputs times out.

    Adds, in a new ExpectBlock, a TimeoutWhen that matches whenever the read from any of the FromStreamInputs times out. This is a shortcut to expect.when(pattern).

    pattern

    the pattern to be used in the TimeoutWhen.

    returns

    the new RegexWhen.

  16. def expect(pattern: EndOfFile.type, readFrom: FromInputStream): EndOfFileWhen[R]

    Adds, in a new ExpectBlock, a EndOfFileWhen that matches whenever the end of file is reached while trying to read from the specified FromInputStream.

    Adds, in a new ExpectBlock, a EndOfFileWhen that matches whenever the end of file is reached while trying to read from the specified FromInputStream. This is a shortcut to expect.when(pattern, readFrom).

    pattern

    the pattern to be used in the EndOfFileWhen.

    readFrom

    from which FromInputStream to read the output.

    returns

    the new RegexWhen.

  17. def expect(pattern: EndOfFile.type): EndOfFileWhen[R]

    Adds, in a new ExpectBlock, a EndOfFileWhen that matches whenever the end of file is reached while trying to read from the StdOut output.

    Adds, in a new ExpectBlock, a EndOfFileWhen that matches whenever the end of file is reached while trying to read from the StdOut output. This is a shortcut to expect.when(pattern).

    pattern

    the pattern to be used in the EndOfFileWhen.

    returns

    the new RegexWhen.

  18. def expect(pattern: Regex, readFrom: FromInputStream): RegexWhen[R]

    Adds, in a new ExpectBlock, a RegexWhen that matches whenever the regex pattern successfully matches against the text read from the specified FromInputStream.

    Adds, in a new ExpectBlock, a RegexWhen that matches whenever the regex pattern successfully matches against the text read from the specified FromInputStream. This is a shortcut to expect.when(pattern, readFrom).

    pattern

    the pattern to be used in the RegexWhen.

    readFrom

    from which FromInputStream to read the output.

    returns

    the new RegexWhen.

  19. def expect(pattern: Regex): RegexWhen[R]

    Adds, in a new ExpectBlock, a RegexWhen that matches whenever the regex pattern successfully matches against the text read from the StdOut output.

    Adds, in a new ExpectBlock, a RegexWhen that matches whenever the regex pattern successfully matches against the text read from the StdOut output. This is a shortcut to expect.when(pattern).

    pattern

    the pattern to be used in the RegexWhen.

    returns

    the new RegexWhen.

  20. def expect(pattern: String, readFrom: FromInputStream): StringWhen[R]

    Adds, in a new ExpectBlock, a StringWhen that matches whenever pattern is contained in the text read from the specified FromInputStream.

    Adds, in a new ExpectBlock, a StringWhen that matches whenever pattern is contained in the text read from the specified FromInputStream. This is a shortcut to expect.when(pattern, readFrom).

    pattern

    the pattern to be used in the StringWhen.

    readFrom

    from which FromInputStream to read the output.

    returns

    the new StringWhen.

  21. def expect(pattern: String): StringWhen[R]

    Adds, in a new ExpectBlock, a StringWhen that matches whenever pattern is contained in the text read from the StdOut output.

    Adds, in a new ExpectBlock, a StringWhen that matches whenever pattern is contained in the text read from the StdOut output. This is a shortcut to expect.when(pattern).

    pattern

    the pattern to be used in the StringWhen.

    returns

    the new StringWhen.

  22. def expect(readFrom: FromInputStream): ExpectBlock[R]

    Adds an empty new ExpectBlock reading from the specified FromInputStream.

    Adds an empty new ExpectBlock reading from the specified FromInputStream.

    readFrom

    from which FromInputStream to read the output.

    returns

    the new ExpectBlock.

  23. def expect: ExpectBlock[R]

    Adds an empty new ExpectBlock.

    Adds an empty new ExpectBlock.

    returns

    the new ExpectBlock.

  24. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Expectable[R] to StringFormat[Expectable[R]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def [B](y: B): (Expectable[R], B)
    Implicit
    This member is added by an implicit conversion from Expectable[R] to ArrowAssoc[Expectable[R]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Expectable[R] to any2stringadd[Expectable[R]]

Inherited by implicit conversion StringFormat from Expectable[R] to StringFormat[Expectable[R]]

Inherited by implicit conversion Ensuring from Expectable[R] to Ensuring[Expectable[R]]

Inherited by implicit conversion ArrowAssoc from Expectable[R] to ArrowAssoc[Expectable[R]]

Ungrouped