ViewAsserts
open classViewAsserts
Some useful assertions about views.
Summary
Public methods | |
---|---|
open static Unit |
assertBaselineAligned(first: View!, second: View!) Assert that two views are aligned on their baseline, that is that their baselines are on the same y location. |
open static Unit |
assertBottomAligned(first: View!, second: View!) Assert that two views are bottom aligned, that is that their bottom edges are on the same y location. |
open static Unit |
assertBottomAligned(first: View!, second: View!, margin: Int) Assert that two views are bottom aligned, that is that their bottom edges are on the same y location, with respect to the specified margin. |
open static Unit |
assertGroupContains(parent: ViewGroup!, child: View!) Assert that the specified group contains a specific child once and only once. |
open static Unit |
assertGroupIntegrity(parent: ViewGroup!) Assert the specified group's integrity. |
open static Unit |
assertGroupNotContains(parent: ViewGroup!, child: View!) Assert that the specified group does not contain a specific child. |
open static Unit |
assertHasScreenCoordinates(origin: View!, view: View!, x: Int, y: Int) Assert that a view has a particular x and y position on the visible screen. |
open static Unit |
assertHorizontalCenterAligned(reference: View!, test: View!) Assert that the |
open static Unit |
assertLeftAligned(first: View!, second: View!) Assert that two views are left aligned, that is that their left edges are on the same x location. |
open static Unit |
assertLeftAligned(first: View!, second: View!, margin: Int) Assert that two views are left aligned, that is that their left edges are on the same x location, with respect to the specified margin. |
open static Unit |
assertOffScreenAbove(origin: View!, view: View!) Assert that view is above the visible screen. |
open static Unit |
assertOffScreenBelow(origin: View!, view: View!) Assert that view is below the visible screen. |
open static Unit |
assertOnScreen(origin: View!, view: View!) Assert that view is on the screen. |
open static Unit |
assertRightAligned(first: View!, second: View!) Assert that two views are right aligned, that is that their right edges are on the same x location. |
open static Unit |
assertRightAligned(first: View!, second: View!, margin: Int) Assert that two views are right aligned, that is that their right edges are on the same x location, with respect to the specified margin. |
open static Unit |
assertTopAligned(first: View!, second: View!) Assert that two views are top aligned, that is that their top edges are on the same y location. |
open static Unit |
assertTopAligned(first: View!, second: View!, margin: Int) Assert that two views are top aligned, that is that their top edges are on the same y location, with respect to the specified margin. |
open static Unit |
assertVerticalCenterAligned(reference: View!, test: View!) Assert that the |
Public methods
assertBaselineAligned
open static funassertBaselineAligned(
first: View!,
second: View!
): Unit
Deprecated: Deprecated in Java.
Assert that two views are aligned on their baseline, that is that their baselines are on the same y location.
assertBottomAligned
open static funassertBottomAligned(
first: View!,
second: View!
): Unit
Deprecated: Deprecated in Java.
Assert that two views are bottom aligned, that is that their bottom edges are on the same y location.
assertBottomAligned
open static funassertBottomAligned(
first: View!,
second: View!,
margin: Int
): Unit
Deprecated: Deprecated in Java.
Assert that two views are bottom aligned, that is that their bottom edges are on the same y location, with respect to the specified margin.
assertGroupContains
open static funassertGroupContains(
parent: ViewGroup!,
child: View!
): Unit
Deprecated: Deprecated in Java.
Assert that the specified group contains a specific child once and only once.
assertGroupIntegrity
open static funassertGroupIntegrity(parent: ViewGroup!): Unit
Deprecated: Deprecated in Java.
Assert the specified group's integrity. The children count should be >= 0 and each child should be non-null.
Parameters | |
---|---|
parent |
ViewGroup!: The group whose integrity to check |
assertGroupNotContains
open static funassertGroupNotContains(
parent: ViewGroup!,
child: View!
): Unit
Deprecated: Deprecated in Java.
Assert that the specified group does not contain a specific child.
assertHasScreenCoordinates
open static funassertHasScreenCoordinates(
origin: View!,
view: View!,
x: Int,
y: Int
): Unit
Deprecated: Deprecated in Java.
Assert that a view has a particular x and y position on the visible screen.
assertHorizontalCenterAligned
open static funassertHorizontalCenterAligned(
reference: View!,
test: View!
): Unit
Deprecated: Deprecated in Java.
Assert that the test
view is horizontally center aligned with respect to the reference
view.
assertLeftAligned
open static funassertLeftAligned(
first: View!,
second: View!
): Unit
Deprecated: Deprecated in Java.
Assert that two views are left aligned, that is that their left edges are on the same x location.
assertLeftAligned
open static funassertLeftAligned(
first: View!,
second: View!,
margin: Int
): Unit
Deprecated: Deprecated in Java.
Assert that two views are left aligned, that is that their left edges are on the same x location, with respect to the specified margin.
assertOffScreenAbove
open static funassertOffScreenAbove(
origin: View!,
view: View!
): Unit
Deprecated: Deprecated in Java.
Assert that view is above the visible screen.
assertOffScreenBelow
open static funassertOffScreenBelow(
origin: View!,
view: View!
): Unit
Deprecated: Deprecated in Java.
Assert that view is below the visible screen.
assertOnScreen
open static funassertOnScreen(
origin: View!,
view: View!
): Unit
Deprecated: Deprecated in Java.
Assert that view is on the screen.
assertRightAligned
open static funassertRightAligned(
first: View!,
second: View!
): Unit
Deprecated: Deprecated in Java.
Assert that two views are right aligned, that is that their right edges are on the same x location.
assertRightAligned
open static funassertRightAligned(
first: View!,
second: View!,
margin: Int
): Unit
Deprecated: Deprecated in Java.
Assert that two views are right aligned, that is that their right edges are on the same x location, with respect to the specified margin.
assertTopAligned
open static funassertTopAligned(
first: View!,
second: View!
): Unit
Deprecated: Deprecated in Java.
Assert that two views are top aligned, that is that their top edges are on the same y location.
assertTopAligned
open static funassertTopAligned(
first: View!,
second: View!,
margin: Int
): Unit
Deprecated: Deprecated in Java.
Assert that two views are top aligned, that is that their top edges are on the same y location, with respect to the specified margin.
assertVerticalCenterAligned
open static funassertVerticalCenterAligned(
reference: View!,
test: View!
): Unit
Deprecated: Deprecated in Java.
Assert that the test
view is vertically center aligned with respect to the reference
view.