All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fest.assertions.api.android.content.AsyncTaskLoaderAssert Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
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