org.fest.assertions.api.android.view.ViewTreeObserverAssert 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.view;
import android.view.ViewTreeObserver;
import org.fest.assertions.api.Assertions;
import org.fest.assertions.api.AbstractAssert;
/** Assertions for {@link ViewTreeObserver} instances. */
public class ViewTreeObserverAssert
extends AbstractAssert {
public ViewTreeObserverAssert(ViewTreeObserver actual) {
super(actual, ViewTreeObserverAssert.class);
}
public ViewTreeObserverAssert isAlive() {
isNotNull();
Assertions.assertThat(actual.isAlive()) //
.overridingErrorMessage("Expected to be alive but was not alive.") //
.isTrue();
return this;
}
public ViewTreeObserverAssert isNotAlive() {
isNotNull();
Assertions.assertThat(actual.isAlive()) //
.overridingErrorMessage("Expected to not be alive but was alive.") //
.isFalse();
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy