trait Expectable[R] extends AnyRef
- Alphabetic
- By Inheritance
- Expectable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Concrete Value Members
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        !=(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ##(): Int
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        
        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()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ==(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        addExpectBlock(f: (Expect[R]) ⇒ Unit): Expect[R]
      
      
      Add arbitrary ExpectBlocks to thisExpect.Add arbitrary ExpectBlocks to thisExpect.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.
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        asInstanceOf[T0]: T0
      
      
      - Definition Classes
- Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        clone(): AnyRef
      
      
      - Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        eq(arg0: AnyRef): Boolean
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        equals(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(pattern: Timeout.type): TimeoutWhen[R]
      
      
      Adds, in a new ExpectBlock, aTimeoutWhenthat matches whenever the read from any of theFromStreamInputs times out.Adds, in a new ExpectBlock, aTimeoutWhenthat matches whenever the read from any of theFromStreamInputs times out. This is a shortcut toexpect.when(pattern).- pattern
- the pattern to be used in the - TimeoutWhen.
- returns
- the new - RegexWhen.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(pattern: EndOfFile.type, readFrom: FromInputStream): EndOfFileWhen[R]
      
      
      Adds, in a new ExpectBlock, aEndOfFileWhenthat matches whenever the end of file is reached while trying to read from the specifiedFromInputStream.Adds, in a new ExpectBlock, aEndOfFileWhenthat matches whenever the end of file is reached while trying to read from the specifiedFromInputStream. This is a shortcut toexpect.when(pattern, readFrom).- pattern
- the pattern to be used in the - EndOfFileWhen.
- readFrom
- from which - FromInputStreamto read the output.
- returns
- the new - RegexWhen.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(pattern: EndOfFile.type): EndOfFileWhen[R]
      
      
      Adds, in a new ExpectBlock, aEndOfFileWhenthat matches whenever the end of file is reached while trying to read from the StdOut output.Adds, in a new ExpectBlock, aEndOfFileWhenthat matches whenever the end of file is reached while trying to read from the StdOut output. This is a shortcut toexpect.when(pattern).- pattern
- the pattern to be used in the - EndOfFileWhen.
- returns
- the new - RegexWhen.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(pattern: Regex, readFrom: FromInputStream): RegexWhen[R]
      
      
      Adds, in a new ExpectBlock, aRegexWhenthat matches whenever the regexpatternsuccessfully matches against the text read from the specifiedFromInputStream.Adds, in a new ExpectBlock, aRegexWhenthat matches whenever the regexpatternsuccessfully matches against the text read from the specifiedFromInputStream. This is a shortcut toexpect.when(pattern, readFrom).- pattern
- the pattern to be used in the - RegexWhen.
- readFrom
- from which - FromInputStreamto read the output.
- returns
- the new - RegexWhen.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(pattern: Regex): RegexWhen[R]
      
      
      Adds, in a new ExpectBlock, aRegexWhenthat matches whenever the regexpatternsuccessfully matches against the text read from the StdOut output.Adds, in a new ExpectBlock, aRegexWhenthat matches whenever the regexpatternsuccessfully matches against the text read from the StdOut output. This is a shortcut toexpect.when(pattern).- pattern
- the pattern to be used in the - RegexWhen.
- returns
- the new - RegexWhen.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(pattern: String, readFrom: FromInputStream): StringWhen[R]
      
      
      Adds, in a new ExpectBlock, aStringWhenthat matches wheneverpatternis contained in the text read from the specifiedFromInputStream.Adds, in a new ExpectBlock, aStringWhenthat matches wheneverpatternis contained in the text read from the specifiedFromInputStream. This is a shortcut toexpect.when(pattern, readFrom).- pattern
- the pattern to be used in the - StringWhen.
- readFrom
- from which - FromInputStreamto read the output.
- returns
- the new - StringWhen.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(pattern: String): StringWhen[R]
      
      
      Adds, in a new ExpectBlock, aStringWhenthat matches wheneverpatternis contained in the text read from the StdOut output.Adds, in a new ExpectBlock, aStringWhenthat matches wheneverpatternis contained in the text read from the StdOut output. This is a shortcut toexpect.when(pattern).- pattern
- the pattern to be used in the - StringWhen.
- returns
- the new - StringWhen.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect(readFrom: FromInputStream): ExpectBlock[R]
      
      
      Adds an empty new ExpectBlockreading from the specifiedFromInputStream.Adds an empty new ExpectBlockreading from the specifiedFromInputStream.- readFrom
- from which - FromInputStreamto read the output.
- returns
- the new - ExpectBlock.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        expect: ExpectBlock[R]
      
      
      Adds an empty new ExpectBlock.Adds an empty new ExpectBlock.- returns
- the new - ExpectBlock.
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        finalize(): Unit
      
      
      - Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
 
- 
      
      
      
        
      
    
      
        
        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()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        getClass(): Class[_]
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        hashCode(): Int
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        isInstanceOf[T0]: Boolean
      
      
      - Definition Classes
- Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ne(arg0: AnyRef): Boolean
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        notify(): Unit
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        notifyAll(): Unit
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        synchronized[T0](arg0: ⇒ T0): T0
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        toString(): String
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @throws( ... )
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long, arg1: Int): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @throws( ... )
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @throws( ... )
 
- 
      
      
      
        
      
    
      
        
        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