Class GetObjectsFromArrayBodyStepSupplier<T,R>
- java.lang.Object
-
- ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier<T,R,M,P,THIS>
-
- ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier.GetArrayChainedStepSupplier<HttpStepContext,R,HttpResponse<T>,GetObjectsFromArrayBodyStepSupplier<T,R>>
-
- ru.tinkoff.qa.neptune.http.api.response.GetObjectsFromArrayBodyStepSupplier<T,R>
-
- All Implemented Interfaces:
Cloneable,Supplier<Function<HttpStepContext,R[]>>,StepParameterPojo
public final class GetObjectsFromArrayBodyStepSupplier<T,R> extends SequentialGetStepSupplier.GetArrayChainedStepSupplier<HttpStepContext,R,HttpResponse<T>,GetObjectsFromArrayBodyStepSupplier<T,R>>
Builds a step-function that retrieves an array from http response body.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier
SequentialGetStepSupplier.DefaultGetParameterReader, SequentialGetStepSupplier.DefineCriteriaParameterName, SequentialGetStepSupplier.DefineFromParameterName, SequentialGetStepSupplier.DefineGetImperativeParameterName, SequentialGetStepSupplier.DefinePollingTimeParameterName, SequentialGetStepSupplier.DefineResultDescriptionParameterName, SequentialGetStepSupplier.DefineTimeOutParameterName, SequentialGetStepSupplier.GetArrayChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetArrayChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetArrayStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetArrayStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetListChainedStepSupplier<T,S extends Iterable<R>,M,R,THIS extends SequentialGetStepSupplier.GetListChainedStepSupplier<T,S,M,R,THIS>>, SequentialGetStepSupplier.GetListStepSupplier<T,S extends Iterable<R>,R,THIS extends SequentialGetStepSupplier.GetListStepSupplier<T,S,R,THIS>>, SequentialGetStepSupplier.GetObjectChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetObjectChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetObjectFromArrayChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetObjectFromArrayChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetObjectFromArrayStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetObjectFromArrayStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetObjectFromIterableChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetObjectFromIterableChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetObjectFromIterableStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetObjectFromIterableStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetObjectStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetObjectStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetSimpleStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetSimpleStepSupplier<T,R,THIS>>
-
-
Field Summary
-
Fields inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier
toReport
-
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description GetObjectsFromArrayBodyStepSupplier<T,R>pollingInterval(Duration timeOut)Sometimes it is necessary to wait until some result that may be considered valuable is returned.default SresponseCriteria(String description, Predicate<HttpResponse<R>> predicate)Defines criteria for expected http response.default SresponseCriteria(Criteria<HttpResponse<R>> criteria)Defines criteria for expected http response.default SresponseCriteriaNot(Criteria<HttpResponse<R>>... criteria)Defines NOT-expression for expected http response.default SresponseCriteriaOnlyOne(Criteria<HttpResponse<R>>... criteria)Defines XOR-expression for expected http response.default SresponseCriteriaOr(Criteria<HttpResponse<R>>... criteria)Defines OR-expression for expected http response.default SretryTimeOut(Duration timeOut)Defines time to receive a response and get desired data.default THISreturnAfterIndex(int index)Sets lower array index (exclusively) to take items from the array of found/suitable elements.default THISreturnArrayOfLength(int length)Sets count of items to take from the array of found/suitable elements.default THISreturnBeforeIndex(int index)Sets upper array index (exclusively) to take items from the array of found/suitable elements.default THISreturnIfEntireLength(ItemsCountCondition lengthCondition)Defines a length condition for entire array of found/suitable elements.default THISreturnItemsOfIndexes(Integer... indexes)Defines indexes of found items to be returned.default THISreturnOnCondition(String description, Predicate<T> predicate)Defines a condition for entire set of found/suitable elements.default THISreturnOnCondition(Criteria<R[]> condition)Defines a condition for array of found/suitable elements.default THISreturnOnConditionOnlyNot(Criteria<T>... condition)Defines a condition for entire set of found/suitable elements.default THISreturnOnConditionOnlyOne(Criteria<T>... condition)Defines a condition for entire set of found/suitable elements.default THISreturnOnConditionOr(Criteria<T>... condition)Defines a condition for entire set of found/suitable elements.GetObjectsFromArrayBodyStepSupplier<T,R>throwOnNoResult()This method says that it is necessary to throw an exception and to fail a test when no valuable data is returned.-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier.GetArrayChainedStepSupplier
from, from, from
-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier
addIgnored, addIgnored, additionalParameters, eraseTimeOut, getCriteria, getDescription, getEndFunction, getFrom, getParameters, makeACopy, onFailure, onStart, onSuccess, preparePreFunction, setDescription, timeOut, toString, turnReportingOff
-
-
-
-
Method Detail
-
throwOnNoResult
public GetObjectsFromArrayBodyStepSupplier<T,R> throwOnNoResult()
Description copied from class:SequentialGetStepSupplierThis method says that it is necessary to throw an exception and to fail a test when no valuable data is returned.- Overrides:
throwOnNoResultin classSequentialGetStepSupplier<HttpStepContext,R[],HttpResponse<T>,R,GetObjectsFromArrayBodyStepSupplier<T,R>>- Returns:
- self-reference
-
pollingInterval
public GetObjectsFromArrayBodyStepSupplier<T,R> pollingInterval(Duration timeOut)
Description copied from class:SequentialGetStepSupplierSometimes it is necessary to wait until some result that may be considered valuable is returned. It sets how often the function should be evaluated.- Overrides:
pollingIntervalin classSequentialGetStepSupplier<HttpStepContext,R[],HttpResponse<T>,R,GetObjectsFromArrayBodyStepSupplier<T,R>>- Parameters:
timeOut- The timeout duration.- Returns:
- A self reference.
-
retryTimeOut
public default S retryTimeOut(Duration timeOut)
Defines time to receive a response and get desired data.- Parameters:
timeOut- is a time duration to receive a response and get desired data- Returns:
- self-reference
-
responseCriteria
public default S responseCriteria(String description, Predicate<HttpResponse<R>> predicate)
Defines criteria for expected http response.- Parameters:
description- criteria descriptionpredicate- is how to match http response- Returns:
- self-reference
-
responseCriteria
public default S responseCriteria(Criteria<HttpResponse<R>> criteria)
Defines criteria for expected http response.- Parameters:
criteria- describes how to match http response- Returns:
- self-reference
-
responseCriteriaOr
public default S responseCriteriaOr(Criteria<HttpResponse<R>>... criteria)
Defines OR-expression for expected http response.- Parameters:
criteria- describes how to match http response- Returns:
- self-reference
-
responseCriteriaOnlyOne
public default S responseCriteriaOnlyOne(Criteria<HttpResponse<R>>... criteria)
Defines XOR-expression for expected http response.- Parameters:
criteria- describes how to match http response- Returns:
- self-reference
-
responseCriteriaNot
public default S responseCriteriaNot(Criteria<HttpResponse<R>>... criteria)
Defines NOT-expression for expected http response.- Parameters:
criteria- describes how to match http response- Returns:
- self-reference
-
returnArrayOfLength
public default THIS returnArrayOfLength(int length)
Sets count of items to take from the array of found/suitable elements. Invocation of this method erases value set byreturnItemsOfIndexes(Integer...).- Parameters:
length- length of resulted array- Returns:
- self-reference
-
returnItemsOfIndexes
public default THIS returnItemsOfIndexes(Integer... indexes)
Defines indexes of found items to be returned. Invocation of this method erases value set byreturnArrayOfLength(int)andreturnBeforeIndex(int)/returnAfterIndex(int)- Parameters:
indexes- indexes of items to be returned- Returns:
- self-reference
-
returnBeforeIndex
public default THIS returnBeforeIndex(int index)
Sets upper array index (exclusively) to take items from the array of found/suitable elements. Invocation of this method replaces value set byreturnAfterIndex(int)and erases value set byreturnItemsOfIndexes(Integer...)- Parameters:
index- is exclusive value of the upper index- Returns:
- self-reference
-
returnAfterIndex
public default THIS returnAfterIndex(int index)
Sets lower array index (exclusively) to take items from the array of found/suitable elements. Invocation of this method replaces value set byreturnBeforeIndex(int)and erases value set byreturnItemsOfIndexes(Integer...)- Parameters:
index- is exclusive value of the lower index- Returns:
- self-reference
-
returnIfEntireLength
public default THIS returnIfEntireLength(ItemsCountCondition lengthCondition)
Defines a length condition for entire array of found/suitable elements.- Parameters:
lengthCondition- a length condition for entire array- Returns:
- self-reference
-
returnOnCondition
public default THIS returnOnCondition(Criteria<R[]> condition)
Defines a condition for array of found/suitable elements.- Parameters:
condition- a condition for entire array- Returns:
- self-reference
-
returnOnCondition
public default THIS returnOnCondition(String description, Predicate<T> predicate)
Defines a condition for entire set of found/suitable elements.- Parameters:
description- describes the conditionpredicate- defines the condition- Returns:
- self-reference
-
returnOnConditionOr
public default THIS returnOnConditionOr(Criteria<T>... condition)
Defines a condition for entire set of found/suitable elements. Defined criteria will be transformed into OR-expression- Parameters:
condition- condition for entire set of items- Returns:
- self-reference
-
returnOnConditionOnlyOne
public default THIS returnOnConditionOnlyOne(Criteria<T>... condition)
Defines a condition for entire set of found/suitable elements. Defined criteria will be transformed into XOR-expression- Parameters:
condition- condition for entire set of items- Returns:
- self-reference
-
returnOnConditionOnlyNot
public default THIS returnOnConditionOnlyNot(Criteria<T>... condition)
Defines a condition for entire set of found/suitable elements. Defined criteria will be inverted- Parameters:
condition- condition for entire set of items- Returns:
- self-reference
-
-