org.assertj.android.api.app.LoaderManagerAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of assertj-android Show documentation
Show all versions of assertj-android Show documentation
A set of AssertJ assertion helpers geared toward testing Android.
The newest version!
package org.assertj.android.api.app;
import android.annotation.TargetApi;
import android.app.LoaderManager;
import org.assertj.core.api.AbstractAssert;
import static android.os.Build.VERSION_CODES.HONEYCOMB;
import static org.assertj.core.api.Assertions.assertThat;
/** Assertions for {@link LoaderManager} instances. */
@TargetApi(HONEYCOMB)
public class LoaderManagerAssert extends AbstractAssert {
public LoaderManagerAssert(LoaderManager actual) {
super(actual, LoaderManagerAssert.class);
}
public LoaderManagerAssert hasLoader(int id) {
isNotNull();
assertThat(actual.getLoader(id))
.overridingErrorMessage("Expected loader with ID <%s> but was not present.", id)
.isNotNull();
return this;
}
}