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:
- GetExpectation(xIndex, yIndex)¶
Returns the expectation object.
- Parameters:
- Returns:
The expectation object
- Return type:
- 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:
- 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:
- 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]
- 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.
- SetExpectationExpression(xIndex, yIndex, expression)¶
Sets the expectations expression.
- SetXDistributionExpectation(index, expectationObject)¶
Sets the expectations object.
- SetXDistributionExpectationExpression(index, expression)¶
Sets the distribution level of the given position.
- SetYDistributionExpectation(index, expectationObject)¶
Sets the expectations object.
- SetYDistributionExpectationExpression(index, expression)¶
Sets the distribution level of the given position.