Package com.microsoft.playwright.impl
Class APIResponseAssertionsImpl
- java.lang.Object
-
- com.microsoft.playwright.impl.APIResponseAssertionsImpl
-
- All Implemented Interfaces:
APIResponseAssertions
public class APIResponseAssertionsImpl extends java.lang.Object implements APIResponseAssertions
-
-
Field Summary
Fields Modifier and Type Field Description private APIResponseactualprivate booleanisNot
-
Constructor Summary
Constructors Constructor Description APIResponseAssertionsImpl(APIResponse response)APIResponseAssertionsImpl(APIResponse response, boolean isNot)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidisOK()Ensures the response status code is within200..299range.(package private) static booleanisTextualMimeType(java.lang.String mimeType)APIResponseAssertionsnot()Makes the assertion check for the opposite condition.
-
-
-
Field Detail
-
actual
private final APIResponse actual
-
isNot
private final boolean isNot
-
-
Constructor Detail
-
APIResponseAssertionsImpl
APIResponseAssertionsImpl(APIResponse response, boolean isNot)
-
APIResponseAssertionsImpl
public APIResponseAssertionsImpl(APIResponse response)
-
-
Method Detail
-
not
public APIResponseAssertions not()
Description copied from interface:APIResponseAssertionsMakes the assertion check for the opposite condition. For example, this code tests that the response status is not successful:assertThat(response).not().isOK();- Specified by:
notin interfaceAPIResponseAssertions
-
isOK
public void isOK()
Description copied from interface:APIResponseAssertionsEnsures the response status code is within200..299range.**Usage**
assertThat(response).isOK();- Specified by:
isOKin interfaceAPIResponseAssertions
-
isTextualMimeType
static boolean isTextualMimeType(java.lang.String mimeType)
-
-