package actions
- Alphabetic
- Public
- All
Type Members
- sealed trait AbstractReturning [+WR] extends Action[WR, When]
- sealed trait AbstractReturningWithRegex [+WR] extends Action[WR, RegexWhen]
- trait Action [+R, -W[+X] <: When[X]] extends AnyRef
- case class ActionReturningAction [R, +T](parent: Returning[R], resultAction: (R) ⇒ AbstractReturning[T]) extends AbstractReturning[T] with Product with Serializable
- case class ActionReturningActionWithRegex [R, +T](parent: ReturningWithRegex[R], resultAction: (R) ⇒ AbstractReturningWithRegex[T]) extends AbstractReturningWithRegex[T] with Product with Serializable
-
final
case class
Exit
[+R]() extends Action[R, When] with Product with Serializable
When this action is executed the current run of Expect is terminated causing it to return the last value, if there is a ReturningAction, or the default value otherwise.
When this action is executed the current run of Expect is terminated causing it to return the last value, if there is a ReturningAction, or the default value otherwise.
Any action or expect block added after this will not be executed.
-
case class
Returning
[+R](result: (Unit) ⇒ R) extends AbstractReturning[R] with Product with Serializable
When this Action is executed the result of evaluating
result
is returned by the current run of Expect.When this Action is executed the result of evaluating
result
is returned by the current run of Expect. If more than one returning action is added to a When only the lastresult
will be returned. Note however that every returning action will still be executed. -
case class
ReturningExpect
[+R](result: (Unit) ⇒ Expect[R]) extends AbstractReturning[R] with Product with Serializable
When this action is executed:
When this action is executed:
1. The current run of Expect is terminated (like with an
Exit
) but its return value is discarded. 2.result
is evaluated to obtain the expect. 3. The obtained expect is run with the same run context (timeout, charset, etc) as the terminated expect. 4. The result obtained in the previous step becomes the result of the current expect (the terminated one).This works out as a special combination of an
Exit
with aReturning
. Where the exit deallocates the resources allocated by the current expect. And the result of theReturning
is obtained from the result of executing the received expect.Any action or expect block added after this will not be executed.
-
case class
ReturningExpectWithRegex
[+R](result: (Match) ⇒ Expect[R]) extends AbstractReturningWithRegex[R] with Product with Serializable
When this action is executed:
When this action is executed:
1. The current run of Expect is terminated (like with an
Exit
) but its return value is discarded. 2.result
is evaluated to obtain the expect. 3. The obtained expect is run with the same run context (timeout, charset, etc) as the terminated expect. 4. The result obtained in the previous step becomes the result of the current expect (the terminated one).This works out as a special combination of an
Exit
with aReturning
. Where the exit deallocates the resources allocated by the current expect. And the result of theReturning
is obtained from the result of executing the received expect.This allows to construct the Expect based on the regex Match. This Action can only be added to a RegexWhen. Any action or expect block added after this will not be executed.
-
case class
ReturningWithRegex
[+R](result: (Match) ⇒ R) extends AbstractReturningWithRegex[R] with Product with Serializable
When this Action is executed the result of evaluating
result
is returned by the current run of Expect.When this Action is executed the result of evaluating
result
is returned by the current run of Expect. This allows to return data based on the regex Match. This Action can only be added to a RegexWhen. If more than one returning action is added to a When only the lastresult
will be returned. Note however that every returning action will still be executed. -
final
case class
Send
[+R](text: String, sensitive: Boolean = false) extends Action[R, When] with Product with Serializable
When this action is executed
text
will be sent to the stdIn of the underlying process.When this action is executed
text
will be sent to the stdIn of the underlying process.- text
the text to send.
-
final
case class
SendWithRegex
[+R](text: (Match) ⇒ String) extends Action[R, RegexWhen] with Product with Serializable
When this action is executed the result of evaluating
text
will be sent to the stdIn of the underlying process.When this action is executed the result of evaluating
text
will be sent to the stdIn of the underlying process. This allows to send data to the process based on the regex Match. This Action can only be added to a RegexWhen.- text
the text to send.
Value Members
- object Returning extends Serializable
- object ReturningExpect extends Serializable
- object Sendln
- object SendlnWithRegex