Package 

Interface TextViewAssertions

  • All Implemented Interfaces:
    io.github.kakaocup.kakao.common.assertions.BaseAssertions

    
    public interface TextViewAssertions
     implements BaseAssertions
                        

    Provides text based assertions for views

    • Method Detail

      • hasText

         Unit hasText(String text)

        Checks if the view has given text

        Parameters:
        text - Text to be matched
      • hasText

         Unit hasText(@StringRes() Integer resId)

        Checks if the view has given text

        Parameters:
        resId - String resource to be matched
      • hasText

         Unit hasText(Matcher<String> matcher)

        Checks if the view has text that matches given matcher

      • hasNoText

         Unit hasNoText(String text)

        Checks if the view does not have a given text

        Parameters:
        text - Text to be matched
      • hasNoText

         Unit hasNoText(@StringRes() Integer resId)

        Checks if the view does not have a given text

        Parameters:
        resId - String resource to be matched
      • hasContentDescription

         Unit hasContentDescription(String text)

        Checks if the view has given content description

        Parameters:
        text - Content description to be matched
      • containsText

         Unit containsText(String text)

        Checks if the view contains given text

        Parameters:
        text - Text to be searched
      • startsWithText

         Unit startsWithText(String text)

        Checks if the view text start with given substring

        Parameters:
        text - Text to be searched
      • hasHint

         Unit hasHint(String hint)

        Checks if the view has given hint

        Parameters:
        hint - Text to be matched
      • hasHint

         Unit hasHint(@StringRes() Integer resId)

        Checks if the view has given hint

        Parameters:
        resId - String resource to be matched
      • hasGravity

         Unit hasGravity(Integer horizontalGravity, Integer verticalGravity)

        Checks if the view has given gravity

        Parameters:
        horizontalGravity - relative horizontal gravity values to be matched
        verticalGravity - vertical gravity values to be matched
      • hasTextSize

         Unit hasTextSize(Integer sp)

        Checks if the view has text size in sp

        Parameters:
        sp - Text size in sp to be matched
      • hasTypeface

         Unit hasTypeface(Typeface typeface)

        Checks if the view has given typeface

        Parameters:
        typeface - TextView typeface to be matched
      • isBold

         Unit isBold()

        Checks if the text view is bold

      • isItalic

         Unit isItalic()

        Checks if the text view is italic

      • hasDrawableSpan

         Unit hasDrawableSpan(Integer queryStart, Integer queryEnd, @DrawableRes() Integer resId, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        queryStart - Index of the character that is the beginning of the range of text to which span is attached
        queryEnd - Index of the character that is the end of the range of text to which span is attached
        resId - Drawable resource to be matched
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)
      • hasDrawableSpan

         Unit hasDrawableSpan(Integer queryStart, Integer queryEnd, Drawable drawable, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        queryStart - Index of the character that is the beginning of the range of text to which span is attached
        queryEnd - Index of the character that is the end of the range of text to which span is attached
        drawable - Drawable to be matched
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)
      • hasDrawableSpan

         Unit hasDrawableSpan(Integer spanIndex, @DrawableRes() Integer resId, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        spanIndex - Index of span in string's spans array
        resId - Drawable resource to be matched
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)
      • hasDrawableSpan

         Unit hasDrawableSpan(Integer spanIndex, Drawable drawable, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        spanIndex - Index of span in string's spans array
        drawable - Drawable to be matched
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)
      • hasDrawableSpanWithTint

         Unit hasDrawableSpanWithTint(Integer queryStart, Integer queryEnd, @DrawableRes() Integer resId, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        queryStart - Index of the character that is the beginning of the range of text to which span is attached
        queryEnd - Index of the character that is the end of the range of text to which span is attached
        resId - Drawable resource to be matched
        tintColorId - Tint color resource id
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)
      • hasDrawableSpanWithTint

         Unit hasDrawableSpanWithTint(Integer queryStart, Integer queryEnd, Drawable drawable, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        queryStart - Index of the character that is the beginning of the range of text to which span is attached
        queryEnd - Index of the character that is the end of the range of text to which span is attached
        drawable - Drawable to be matched
        tintColorId - Tint color resource id
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)
      • hasDrawableSpanWithTint

         Unit hasDrawableSpanWithTint(Integer spanIndex, @DrawableRes() Integer resId, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        spanIndex - Index of span in string's spans array
        resId - Drawable resource to be matched
        tintColorId - Tint color resource id
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)
      • hasDrawableSpanWithTint

         Unit hasDrawableSpanWithTint(Integer spanIndex, Drawable drawable, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)

        Checks if the drawable span displayed in the view

        Parameters:
        spanIndex - Index of span in string's spans array
        drawable - Drawable to be matched
        tintColorId - Tint color resource id
        toBitmap - Lambda with custom Drawable -> Bitmap converter (default is null)