-
- All Implemented Interfaces:
-
io.github.kakaocup.kakao.common.assertions.BaseAssertions
public interface TextViewAssertions implements BaseAssertions
Provides text based assertions for views
-
-
Method Summary
Modifier and Type Method Description UnithasEmptyText()Checks if the view have not any text UnithasAnyText()Checks if the view has any text UnithasText(String text)Checks if the view has given text UnithasText(@StringRes() Integer resId)Checks if the view has given text UnithasText(Matcher<String> matcher)Checks if the view has text that matches given matcher UnithasTextColor(@ColorRes() Integer resId)Checks if the view has given text color UnithasNoText(String text)Checks if the view does not have a given text UnithasNoText(@StringRes() Integer resId)Checks if the view does not have a given text UnithasContentDescription(String text)Checks if the view has given content description UnitcontainsText(String text)Checks if the view contains given text UnitstartsWithText(String text)Checks if the view text start with given substring UnithasHint(String hint)Checks if the view has given hint UnithasHint(@StringRes() Integer resId)Checks if the view has given hint UnithasCompoundDrawable(@DrawableRes() Integer left, @DrawableRes() Integer top, @DrawableRes() Integer right, @DrawableRes() Integer bottom, @ColorRes() Integer tintColorId)Checks if the view have compound drawables UnithasGravity(Integer horizontalGravity, Integer verticalGravity)Checks if the view has given gravity UnithasTextSize(Integer sp)Checks if the view has text size in sp UnithasTypeface(Typeface typeface)Checks if the view has given typeface UnitisBold()Checks if the text view is bold UnitisNotBold()Checks if the text view is not bold UnitisItalic()Checks if the text view is italic UnitisNotItalic()Checks if the text view is not italic UnithasDrawableSpan(Integer queryStart, Integer queryEnd, @DrawableRes() Integer resId, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view UnithasDrawableSpan(Integer queryStart, Integer queryEnd, Drawable drawable, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view UnithasDrawableSpan(Integer spanIndex, @DrawableRes() Integer resId, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view UnithasDrawableSpan(Integer spanIndex, Drawable drawable, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view UnithasDrawableSpanWithTint(Integer queryStart, Integer queryEnd, @DrawableRes() Integer resId, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view UnithasDrawableSpanWithTint(Integer queryStart, Integer queryEnd, Drawable drawable, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view UnithasDrawableSpanWithTint(Integer spanIndex, @DrawableRes() Integer resId, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view UnithasDrawableSpanWithTint(Integer spanIndex, Drawable drawable, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)Checks if the drawable span displayed in the view abstract ViewInteractionDelegategetView()abstract Matcher<Root>getRoot()abstract UnitsetRoot(Matcher<Root> root)-
Methods inherited from class io.github.kakaocup.kakao.text.TextViewAssertions
assert, doesNotExist, hasAnyTag, hasBackgroundColor, hasBackgroundColor, hasDescendant, hasNotDescendant, hasNotSibling, hasSibling, hasTag, inRoot, isActivated, isAutoHandwritingEnabled, isClickable, isCompletelyAbove, isCompletelyBelow, isCompletelyDisplayed, isCompletelyLeftOf, isCompletelyRightOf, isDirty, isDisabled, isDisplayed, isEnabled, isFocusable, isFocused, isForceDarkAllowed, isGone, isHapticFeedbackEnabled, isHovered, isInvisible, isNotClickable, isNotCompletelyDisplayed, isNotDisplayed, isNotFocusable, isNotFocused, isNotSelected, isSelected, isVisible, matches, notMatches -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
hasEmptyText
Unit hasEmptyText()
Checks if the view have not any text
-
hasAnyText
Unit hasAnyText()
Checks if the view has any text
-
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
-
hasTextColor
Unit hasTextColor(@ColorRes() Integer resId)
Checks if the view has given text color
- Parameters:
resId- Color resource to be matched
-
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
-
hasCompoundDrawable
Unit hasCompoundDrawable(@DrawableRes() Integer left, @DrawableRes() Integer top, @DrawableRes() Integer right, @DrawableRes() Integer bottom, @ColorRes() Integer tintColorId)
Checks if the view have compound drawables
- Parameters:
left- left compound drawable resIdtop- top compound drawable resIdright- right compound drawable resIdbottom- bottom compound drawable resId
-
hasGravity
Unit hasGravity(Integer horizontalGravity, Integer verticalGravity)
Checks if the view has given gravity
- Parameters:
horizontalGravity- relative horizontal gravity values to be matchedverticalGravity- 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
-
isNotItalic
Unit isNotItalic()
Checks if the text view is not 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 attachedqueryEnd- Index of the character that is the end of the range of text to which span is attachedresId- Drawable resource to be matchedtoBitmap- 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 attachedqueryEnd- Index of the character that is the end of the range of text to which span is attacheddrawable- Drawable to be matchedtoBitmap- 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 arrayresId- Drawable resource to be matchedtoBitmap- 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 arraydrawable- Drawable to be matchedtoBitmap- 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 attachedqueryEnd- Index of the character that is the end of the range of text to which span is attachedresId- Drawable resource to be matchedtintColorId- Tint color resource idtoBitmap- 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 attachedqueryEnd- Index of the character that is the end of the range of text to which span is attacheddrawable- Drawable to be matchedtintColorId- Tint color resource idtoBitmap- 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 arrayresId- Drawable resource to be matchedtintColorId- Tint color resource idtoBitmap- 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 arraydrawable- Drawable to be matchedtintColorId- Tint color resource idtoBitmap- Lambda with custom Drawable -> Bitmap converter (default is null)
-
getView
abstract ViewInteractionDelegate getView()
-
-
-
-