MatrixSingleExpectation

class MatrixSingleExpectation

Represents a sparse matrix of expectations. Each element of the matrix represents an individual expectation on the respective value. All individual expectations must be fulfilled in order for the this matrix expectation to be fulfilled.

Each individual expectation is specified as a Boolean expression in Python syntax. The special identifier “value” refers to the actual value of the matrix element.

Returned by

Clone()

Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.

Returns:

A copy of this object

Return type:

MatrixSingleExpectation

GetExpectation(xIndex, yIndex)

Returns the expectation object.

Parameters:
xIndex : int

X-Index of the expectation object.

yIndex : int

Y-Index of the expectation object.

Returns:

The expectation object

Return type:

Expectation

GetExpectationExpression(xIndex, yIndex)

Returns the expectations expression.

Parameters:
xIndex : int

X-Index of the expression.

yIndex : int

Y-Index of the expression.

Returns:

The expression

Return type:

str

GetExpectationExpressionLines()

Returns a list of expectation expressions for all lines. Each line itself is also a list of all the expressions within the line. Elements without expectation are represented by None.

Returns:

Sorted list containing all expressions

Return type:

list[list[str]]

GetXDimension()

Returns the x dimension. :return: The x dimension. :rtype: int

GetYDimension()

Returns the y dimension. :return: The y dimension. :rtype: int

RemoveExpectation(xIndex, yIndex)

Removes an expectation expression

Parameters:
xIndex : int

X-Index of the expression to remove.

yIndex : int

Y-Index of the expression to remove.

SetExpectation(xIndex, yIndex, expectationObject)

Sets the expectation object.

Parameters:
xIndex : int

X-Index of the expectation object.

yIndex : int

Y-Index of the expectation object.

expectationObject

The expectation object

SetExpectationExpression(xIndex, yIndex, expression)

Sets the expectations expression.

Parameters:
xIndex : int

X-Index of the expression.

yIndex : int

Y-Index of the expression.

expression : str

The expression