org.assertj.android.api.view.SurfaceAssert 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.
package org.assertj.android.api.view;
import android.view.Surface;
import org.assertj.core.api.AbstractAssert;
import static org.assertj.core.api.Assertions.assertThat;
public class SurfaceAssert extends AbstractAssert {
public SurfaceAssert(Surface actual) {
super(actual, SurfaceAssert.class);
}
public SurfaceAssert isValid() {
isNotNull();
assertThat(actual.isValid()) //
.overridingErrorMessage("Expected to be valid but was not valid.") //
.isTrue();
return this;
}
public SurfaceAssert isNotValid() {
isNotNull();
assertThat(actual.isValid()) //
.overridingErrorMessage("Expected to not be valid but was valid.") //
.isFalse();
return this;
}
}