class sap.ui.test.matchers.AggregationLengthEquals

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/test/matchers/AggregationLengthEquals
Application Component: CA-UI5-TA

Checks if an aggregation contains a specified number of entries.

As of version 1.72, it is available as a declarative matcher with the following syntax:

{
    aggregationLengthEquals: {
        name: "string",
        length: "integer"
    }
}


Constructor

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.test.matchers.AggregationLengthEquals(mSettings?)
Param Type Default Value Description
mSettings? object

optional map/JSON-object with initial settings for the new AggregationLengthEqualsMatcher


Properties

Name Type Default Value Description
length int

The length that aggregation name should have.

Visibility: public
name string

The name of the aggregation that is used for matching.

Visibility: public

Methods Overview

Method Description
sap.ui.test.matchers.AggregationLengthEquals.extend

Creates a new subclass of class sap.ui.test.matchers.AggregationLengthEquals with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.test.matchers.Matcher.extend.

getLength

Gets current value of property length.

The length that aggregation name should have.

sap.ui.test.matchers.AggregationLengthEquals.getMetadata

Returns a metadata object for class sap.ui.test.matchers.AggregationLengthEquals.

getName

Gets current value of property name.

The name of the aggregation that is used for matching.

isMatching

Checks if the control's aggregation name has length length.

setLength

Sets a new value for property length.

The length that aggregation name should have.

When called with a value of null or undefined, the default value of the property will be restored.

setName

Sets a new value for property name.

The name of the aggregation that is used for matching.

When called with a value of null or undefined, the default value of the property will be restored.

sap.ui.test.matchers.AggregationLengthEquals.extend

Creates a new subclass of class sap.ui.test.matchers.AggregationLengthEquals with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.test.matchers.Matcher.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

getLength

Gets current value of property length.

The length that aggregation name should have.

sap.ui.test.matchers.AggregationLengthEquals.getMetadata

Returns a metadata object for class sap.ui.test.matchers.AggregationLengthEquals.

getName

Gets current value of property name.

The name of the aggregation that is used for matching.

isMatching

Checks if the control's aggregation name has length length.

Param Type DefaultValue Description
oControl sap.ui.core.Control

the control that is checked by the matcher

setLength

Sets a new value for property length.

The length that aggregation name should have.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
iLength int

New value for property length

setName

Sets a new value for property name.

The name of the aggregation that is used for matching.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sName string

New value for property name