MapSingleExpectation

class MapSingleExpectation

Represents a sparse map of expectations. Each element of the map represents an individual expectation on the respective value. All individual expectations must be fulfilled in order for the this map 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 map 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:

MapSingleExpectation

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

GetXDistributionExpectation(index)

Returns the expectation object.

Parameters:
index : int

X-index of the expectation object.

Returns:

The expectation object

Return type:

Expectation

GetXDistributionExpectationExpression(index)

Gets the distribution level of the given position.

Parameters:
index : int

index

Returns:

distribution level expression

Return type:

str

GetXDistributionExpectationExpressions()

Returns a list of all distribution level expectation expression. Elements without expectation are represented by None

Returns:

Sorted list containing all distribution level expectation expressions

Return type:

list[str]

GetYDimension()

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

GetYDistributionExpectation(index)

Returns the expectation object.

Parameters:
index : int

Y-index of the expectation object.

Returns:

The expectation object

Return type:

Expectation

GetYDistributionExpectationExpression(index)

Gets the distribution level of the given position.

Parameters:
index : int

index

Returns:

distribution level expression

Return type:

str

GetYDistributionExpectationExpressions()

Returns a list of all distribution level expectation expression. Elements without expectation are represented by None

Returns:

Sorted list containing all distribution level expectation expressions

Return type:

list[str]

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.

RemoveXDistributionExpectation(index)

Deletes the distribution level of the given position.

Parameters:
index : int

index

RemoveYDistributionExpectation(index)

Deletes the distribution level of the given position.

Parameters:
index : int

index

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

SetXDistributionExpectation(index, expectationObject)

Sets the expectations object.

Parameters:
index : int

X-Index of the expectation object.

expectationObject

The expectation object

SetXDistributionExpectationExpression(index, expression)

Sets the distribution level of the given position.

Parameters:
index : int

index

expression : str

distribution level value

SetYDistributionExpectation(index, expectationObject)

Sets the expectations object.

Parameters:
index : int

Y-Index of the expectation object.

expectationObject

The expectation object

SetYDistributionExpectationExpression(index, expression)

Sets the distribution level of the given position.

Parameters:
index : int

index

expression : str

distribution level value