Class APIResponseAssertionsImpl

java.lang.Object
com.microsoft.playwright.impl.APIResponseAssertionsImpl
All Implemented Interfaces:
APIResponseAssertions

public class APIResponseAssertionsImpl extends Object implements APIResponseAssertions
  • Field Details

    • actual

      private final APIResponse actual
    • isNot

      private final boolean isNot
  • Constructor Details

    • APIResponseAssertionsImpl

      APIResponseAssertionsImpl(APIResponse response, boolean isNot)
    • APIResponseAssertionsImpl

      public APIResponseAssertionsImpl(APIResponse response)
  • Method Details

    • not

      public APIResponseAssertions not()
      Description copied from interface: APIResponseAssertions
      Makes 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:
      not in interface APIResponseAssertions
    • isOK

      public void isOK()
      Description copied from interface: APIResponseAssertions
      Ensures the response status code is within 200..299 range.

      **Usage**

      
       assertThat(response).isOK();
       
      Specified by:
      isOK in interface APIResponseAssertions
    • isTextualMimeType

      static boolean isTextualMimeType(String mimeType)