MotionEventSubject

public final class MotionEventSubject extends Subject


Subject for MotionEvent.

Summary

Public methods

static MotionEventSubject
void
hasAction(int action)
void
hasActionButton(int actionButton)

Check the value of getActionButton

void
hasButtonState(int buttonState)
void
hasDeviceId(int deviceId)
void
hasDownTime(long downTime)
void
hasEdgeFlags(int edgeFlags)
void
hasEventTime(long eventTime)
void
hasFlags(int flags)
void
hasHistorySize(int historySize)
void
hasMetaState(int metaState)
void
hasPointerCount(int pointerCount)
LongSubject
FloatSubject
PointerCoordsSubject
historicalPointerCoords(int pointerIndex, int pos)
FloatSubject
FloatSubject
historicalSize(int pos)
FloatSubject
FloatSubject
FloatSubject
FloatSubject
FloatSubject
historicalX(int pos)
FloatSubject
historicalY(int pos)
static Subject.Factory<MotionEventSubjectMotionEvent>
FloatSubject
FloatSubject
orientation(int pointerIndex)
PointerCoordsSubject
pointerCoords(int pointerIndex)
IntegerSubject
pointerId(int pointerIndex)
PointerPropertiesSubject
pointerProperties(int pointerIndex)
FloatSubject
FloatSubject
pressure(int pointerIndex)
FloatSubject
FloatSubject
FloatSubject
FloatSubject
size(int pointerIndex)
FloatSubject
FloatSubject
toolMajor(int pointerIndex)
FloatSubject
FloatSubject
toolMinor(int pointerIndex)
FloatSubject
FloatSubject
touchMajor(int pointerIndex)
FloatSubject
FloatSubject
touchMinor(int pointerIndex)
FloatSubject
x()
FloatSubject
x(int pointerIndex)
FloatSubject
FloatSubject
y()
FloatSubject
y(int pointerIndex)
FloatSubject

Inherited methods

From com.google.common.truth.Subject
String
final boolean

This method is deprecated.

final void
final void
failWithoutActual(Fact first, Fact[] rest)
final int

This method is deprecated.

final StandardSubjectBuilder
void
isAnyOf(Object first, Object second, Object[] rest)
void
isEqualTo(Object expected)
void
isIn(Iterable<Object> iterable)
void
void
isNoneOf(Object first, Object second, Object[] rest)
void
isNotEqualTo(Object unexpected)
void
isNotIn(Iterable<Object> iterable)
void
void
final void
void
final void
String

This method is deprecated.

Public methods

assertThat

public static MotionEventSubject assertThat(MotionEvent event)

hasAction

public void hasAction(int action)

hasActionButton

public void hasActionButton(int actionButton)

Check the value of getActionButton

Throws
java.lang.IllegalStateException

if called on below Android API 23

hasButtonState

public void hasButtonState(int buttonState)

hasDeviceId

public void hasDeviceId(int deviceId)

hasDownTime

public void hasDownTime(long downTime)

hasEdgeFlags

public void hasEdgeFlags(int edgeFlags)

hasEventTime

public void hasEventTime(long eventTime)

hasFlags

public void hasFlags(int flags)

hasHistorySize

public void hasHistorySize(int historySize)

hasMetaState

public void hasMetaState(int metaState)

hasPointerCount

public void hasPointerCount(int pointerCount)

historicalEventTime

public LongSubject historicalEventTime(int pos)

historicalOrientation

public FloatSubject historicalOrientation(int pos)

historicalPointerCoords

public PointerCoordsSubject historicalPointerCoords(int pointerIndex, int pos)

historicalPressure

public FloatSubject historicalPressure(int pos)

historicalSize

public FloatSubject historicalSize(int pos)

historicalToolMajor

public FloatSubject historicalToolMajor(int pos)

historicalToolMinor

public FloatSubject historicalToolMinor(int pos)

historicalTouchMajor

public FloatSubject historicalTouchMajor(int pos)

historicalTouchMinor

public FloatSubject historicalTouchMinor(int pos)

historicalX

public FloatSubject historicalX(int pos)

historicalY

public FloatSubject historicalY(int pos)

motionEvents

public static Subject.Factory<MotionEventSubjectMotionEventmotionEvents()

orientation

public FloatSubject orientation()

orientation

public FloatSubject orientation(int pointerIndex)

pointerCoords

public PointerCoordsSubject pointerCoords(int pointerIndex)

pointerId

public IntegerSubject pointerId(int pointerIndex)

pointerProperties

public PointerPropertiesSubject pointerProperties(int pointerIndex)

pressure

public FloatSubject pressure()

pressure

public FloatSubject pressure(int pointerIndex)

rawX

public FloatSubject rawX()

rawY

public FloatSubject rawY()

size

public FloatSubject size()

size

public FloatSubject size(int pointerIndex)

toolMajor

public FloatSubject toolMajor()

toolMajor

public FloatSubject toolMajor(int pointerIndex)

toolMinor

public FloatSubject toolMinor()

toolMinor

public FloatSubject toolMinor(int pointerIndex)

touchMajor

public FloatSubject touchMajor()

touchMajor

public FloatSubject touchMajor(int pointerIndex)

touchMinor

public FloatSubject touchMinor()

touchMinor

public FloatSubject touchMinor(int pointerIndex)

x

public FloatSubject x()

x

public FloatSubject x(int pointerIndex)

xPrecision

public FloatSubject xPrecision()

y

public FloatSubject y()

y

public FloatSubject y(int pointerIndex)

yPrecision

public FloatSubject yPrecision()