Package 

Interface BaseAssertions


  • 
    public interface BaseAssertions
    
                        

    Base interface for asserting views

    Provides basic assertions that can be performed on any view

    • Method Detail

      • isVisible

         Unit isVisible()

        Checks if the view has VISIBLE visibility

      • isInvisible

         Unit isInvisible()

        Checks if the view has INVISIBLE visibility

      • isGone

         Unit isGone()

        Checks if the view has GONE visibility

      • hasTag

         Unit hasTag(String tag)

        Checks if the view has given tag

        Parameters:
        tag - Tag that view must have
      • hasAnyTag

         Unit hasAnyTag(String tags)

        Checks if the view has at least one of the given tags

        Parameters:
        tags - Tags with at least one of them should be present in view
      • hasDescendant

         Unit hasDescendant(Function1<ViewBuilder, Unit> function)

        Checks if the view has given descendant

        Parameters:
        function - ViewBuilder that will result in descendant matcher
      • hasNotDescendant

         Unit hasNotDescendant(Function1<ViewBuilder, Unit> function)

        Checks if the view has not given descendant

        Parameters:
        function - ViewBuilder that will result in descendant matcher
      • hasSibling

         Unit hasSibling(Function1<ViewBuilder, Unit> function)

        Checks if the view has given sibling

        Parameters:
        function - ViewBuilder that will result in sibling matcher
      • hasNotSibling

         Unit hasNotSibling(Function1<ViewBuilder, Unit> function)

        Checks if the view has not given sibling

        Parameters:
        function - ViewBuilder that will result in sibling matcher
      • matches

         Unit matches(Function1<ViewBuilder, Unit> function)

        Check if the view matches given matcher

        Parameters:
        function - ViewBuilder that will result in matcher
      • notMatches

         Unit notMatches(Function1<ViewBuilder, Unit> function)

        Check if the view does not match given matcher

        Parameters:
        function - ViewBuilder that will result in matcher
      • assert

         Unit assert(Function0<ViewAssertion> function)

        Check the view with the given custom assertion

        Parameters:
        function - Lambda that must return ViewAssertion
      • inRoot

         Unit inRoot(Function1<RootBuilder, Unit> function)

        Check if the view is in given root

        Parameters:
        function - RootBuilder that will result in root matcher
      • hasBackgroundColor

         Unit hasBackgroundColor(String colorCode)

        Checks if the view has given background color

        Parameters:
        colorCode - Color string code to be matched
      • isCompletelyAbove

         Unit isCompletelyAbove(Function1<ViewBuilder, Unit> function)

        Checks if the view displayed is completely above of the view matching the given matcher.

        Parameters:
        function - ViewBuilder that will result in matcher
      • isCompletelyBelow

         Unit isCompletelyBelow(Function1<ViewBuilder, Unit> function)

        Checks if the view displayed is completely below of the view matching the given matcher.

        Parameters:
        function - ViewBuilder that will result in matcher
      • isCompletelyLeftOf

         Unit isCompletelyLeftOf(Function1<ViewBuilder, Unit> function)

        Checks if the view displayed is completely right of the view matching the given matcher.

        Parameters:
        function - ViewBuilder that will result in matcher
      • isCompletelyRightOf

         Unit isCompletelyRightOf(Function1<ViewBuilder, Unit> function)

        Checks if the view displayed is completely right of the view matching the given matcher.

        Parameters:
        function - ViewBuilder that will result in matcher
      • getRoot

         abstract Matcher<Root> getRoot()