UnitCommand

trait UnitCommand extends Command

A command that doesn't return a result, only succeeds or fails.

A command that doesn't return a result, only succeeds or fails.

trait Command
class Object
trait Matchable
class Any

Type members

Types

final type Result = Unit

Value members

Abstract methods

def postCondition(state: State, success: Boolean): Prop

Concrete methods

final override def postCondition(state: State, result: Try[Unit]): Prop
Definition Classes

Inherited methods

def nextState(state: State): State

Returns a new State instance that represents the state of the system after this command has run, given the system was in the provided state before the run.

Returns a new State instance that represents the state of the system after this command has run, given the system was in the provided state before the run.

Inherited from
Command
def preCondition(state: State): Boolean

Precondition that decides if this command is allowed to run when the system under test is in the provided state.

Precondition that decides if this command is allowed to run when the system under test is in the provided state.

Inherited from
Command
def run(sut: Sut): Result

Executes the command in the system under test, and returns a representation of the result of the command run. The result value is later used for verifying that the command behaved according to the specification, by the postCondition method.

Executes the command in the system under test, and returns a representation of the result of the command run. The result value is later used for verifying that the command behaved according to the specification, by the postCondition method.

Inherited from
Command