@Override @CheckReturnValue public SELF overridingErrorMessage(String newErrorMessage, Object... args) { return super.overridingErrorMessage(newErrorMessage, args); }
@Override @CheckReturnValue public SELF overridingErrorMessage(String newErrorMessage, Object... args) { return super.overridingErrorMessage(newErrorMessage, args); }
public MenuAssert hasItem(int id) { isNotNull(); assertThat(actual.findItem(id)) // .overridingErrorMessage("Expected menu item with ID <%s> but was not found.", id) // .isNotNull(); return this; }
public S hasTag(int key, Object tag) { isNotNull(); Object actualTag = actual.getTag(key); assertThat(actualTag) // .overridingErrorMessage("Expected tag <%s> at key %s but was <%s>", tag, key, actualTag) // .isEqualTo(tag); return myself; }
@TargetApi(KITKAT) public NinePatchAssert hasBitmap(Bitmap bitmap) { isNotNull(); Bitmap actualBitmap = actual.getBitmap(); assertThat(actualBitmap) // .overridingErrorMessage("Expected bitmap <%s> but was <%s>.", bitmap, actualBitmap) // .isEqualTo(bitmap); return this; } }
public CellInfoLteAssert hasCellIdentity(CellIdentityLte cellIdentity) { isNotNull(); CellIdentityLte actualCellIdentity = actual.getCellIdentity(); assertThat(actualCellIdentity) // .overridingErrorMessage("Expected cell identity <%s> but was <%s>.", cellIdentity, actualCellIdentity) // .isEqualTo(cellIdentity); return this; }
public S hasIntent(Intent intent) { isNotNull(); Intent actualIntent = actual.getIntent(); assertThat(actualIntent) // .overridingErrorMessage("Expected intent <%s> but was <%s>.", intent, actualIntent) // .isEqualTo(intent); return myself; }
public CellInfoGsmAssert hasCellSignalStrength(CellSignalStrengthGsm cellSignalStrength) { isNotNull(); CellSignalStrengthGsm actualCellSignalStrength = actual.getCellSignalStrength(); assertThat(actualCellSignalStrength) // .overridingErrorMessage("Expected cell signal strength <%s> but was <%s>.", cellSignalStrength, actualCellSignalStrength) // .isEqualTo(cellSignalStrength); return this; } }
public LocalActivityManagerAssert hasActivity(String id) { isNotNull(); assertThat(actual.getActivity(id)) .overridingErrorMessage("Expected activity with ID <%s> but was not present.", id) .isNotNull(); return this; } }
public FragmentManagerAssert hasFragmentWithTag(String tag) { isNotNull(); assertThat(actual.findFragmentByTag(tag)) // .overridingErrorMessage("Expected fragment with tag <%s> but was not found.", tag) // .isNotNull(); return this; }
public TelephonyManagerAssert hasCellLocation(CellLocation cellLocation) { isNotNull(); CellLocation actualCellLocation = actual.getCellLocation(); assertThat(actualCellLocation) // .overridingErrorMessage("Expected cell location <%s> but was <%s>.", cellLocation, actualCellLocation) // .isEqualTo(cellLocation); return this; }
public UsbRequestAssert hasEndpoint(UsbEndpoint endpoint) { isNotNull(); UsbEndpoint actualEndpoint = actual.getEndpoint(); assertThat(actualEndpoint) // .overridingErrorMessage("Expected endpoint <%s> but was <%s>.", endpoint, actualEndpoint) // .isEqualTo(endpoint); return this; } }
public CellInfoWcdmaAssert hasCellIdentity(CellIdentityWcdma cellIdentity) { isNotNull(); CellIdentityWcdma actualCellIdentity = actual.getCellIdentity(); assertThat(actualCellIdentity) // .overridingErrorMessage("Expected cell identity <%s> but was <%s>.", cellIdentity, actualCellIdentity) // .isEqualTo(cellIdentity); return this; }
/** Equivalent to calling <code>assertThat(value.get()).isEqualTo(value)</code>. */ public StateValueAssert<T> valueEqualTo(T value) { Java6Assertions.assertThat(actual.get()) .overridingErrorMessage( "Expected state value to equal to <%s>, but was <%s>.", value, actual.get()) .isEqualTo(value); return this; } }
@TargetApi(HONEYCOMB) public S hasCallback(Drawable.Callback callback) { isNotNull(); Drawable.Callback actualCallback = actual.getCallback(); assertThat(actualCallback) // .overridingErrorMessage("Expected callback <%s> but was <%s>.", callback, actualCallback) // .isSameAs(callback); return myself; }
@TargetApi(JELLY_BEAN) public S hasParentForAccessibility(ViewParent parent) { isNotNull(); ViewParent actualParent = actual.getParentForAccessibility(); assertThat(actualParent) // .overridingErrorMessage("Expected parent for accessibility <%s> but was <%s>", parent, actualParent) // .isSameAs(parent); return myself; }
public S hasDialog(Dialog dialog) { isNotNull(); Dialog actualDialog = actual.getDialog(); assertThat(actualDialog) // .overridingErrorMessage("Expected dialog <%s> but was <%s>.", dialog, actualDialog) // .isSameAs(dialog); return myself; }
public FragmentManagerAssert doesNotHaveFragmentWithTag(String tag) { isNotNull(); assertThat(actual.findFragmentByTag(tag)) .overridingErrorMessage("Expected fragment with tag <%s> not to be present but was.", tag) .isNull(); return this; } }
@SuppressWarnings("VisibleForTests") public LithoViewAssert doesNotContainTestKey(String testKey) { final TestItem testItem = LithoViewTestHelper.findTestItem(actual, testKey); final Rect bounds = testItem == null ? null : testItem.getBounds(); Java6Assertions.assertThat(testItem) .overridingErrorMessage( "Expected not to find test key <%s> in LithoView <%s>, but it was present at " + "bounds %s.", testKey, actual, bounds) .isNull(); return this; }
@Override public Object answer(InvocationOnMock invocation) throws Throwable { final InternalNode node = (InternalNode) invocation.getArguments()[0]; assertThat(node.getParent()) .overridingErrorMessage("Internal node parent must be null before releasing") .isNull(); return null; } })