Class ModelsCollectionAssertion<C>


  • public class ModelsCollectionAssertion<C>
    extends java.lang.Object
    Assertion on Rest Model Collection Just pass your rest model collection as constructor
    Author:
    Paul Brodner
    • Constructor Detail

    • Method Detail

      • entriesListIsNotEmpty

        public C entriesListIsNotEmpty()
        check if "entries" list from JSON is not empty
      • entriesListIsEmpty

        public C entriesListIsEmpty()
        check if "entries" list from JSON is empty
      • entriesListCountIs

        public C entriesListCountIs​(int expectedCount)
      • entriesListContains

        public C entriesListContains​(java.lang.String key,
                                     java.lang.String value)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • entriesListDoesNotContain

        public C entriesListDoesNotContain​(java.lang.String key,
                                           java.lang.String value)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • entriesListDoesNotContain

        public C entriesListDoesNotContain​(java.lang.String key)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • entriesListContains

        public C entriesListContains​(java.lang.String key)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • paginationExist

        public C paginationExist()
      • paginationField

        public PaginationAssertionVerbs paginationField​(java.lang.String field)
        Check one field from pagination json body
        Parameters:
        field -
        Returns:
      • entriesListIsSortedAscBy

        public C entriesListIsSortedAscBy​(java.lang.String field)
                                   throws java.lang.Exception
        check is the entries are ordered ASC by a specific field
        Parameters:
        field - from json response
        Returns:
        Throws:
        java.lang.Exception
      • entriesListIsSortedDescBy

        public C entriesListIsSortedDescBy​(java.lang.String field)
                                    throws java.lang.Exception
        check is the entries are ordered DESC by a specific field
        Parameters:
        field - from json response
        Returns:
        Throws:
        java.lang.Exception