org.fest.assertions.api.android.content.AsyncTaskLoaderAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fest-android Show documentation
Show all versions of fest-android Show documentation
A set of FEST assertion helpers geared toward testing Android.
package org.fest.assertions.api.android.content;
import android.content.AsyncTaskLoader;
import static org.fest.assertions.api.Assertions.assertThat;
/** Assertions for {@link AsyncTaskLoader} instances. */
public class AsyncTaskLoaderAssert
extends AbstractLoaderAssert {
public AsyncTaskLoaderAssert(AsyncTaskLoader actual) {
super(actual, AsyncTaskLoaderAssert.class);
}
public AsyncTaskLoaderAssert hasLoadInBackgroundCancelled() {
isNotNull();
assertThat(actual.isLoadInBackgroundCanceled()) //
.overridingErrorMessage("Expected load in background cancelled but was not cancelled.") //
.isTrue();
return this;
}
public AsyncTaskLoaderAssert hasLoadInBackgroundNotCancelled() {
isNotNull();
assertThat(actual.isLoadInBackgroundCanceled()) //
.overridingErrorMessage("Expected load in background not cancelled but was cancelled.") //
.isFalse();
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy