org.assertj.android.api.widget.AbstractCompoundButtonAssert 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!
// Copyright 2012 Square, Inc.
package org.assertj.android.api.widget;
import android.widget.CompoundButton;
import static org.assertj.core.api.Assertions.assertThat;
public abstract class AbstractCompoundButtonAssert, A extends CompoundButton>
extends AbstractTextViewAssert {
public AbstractCompoundButtonAssert(A actual, Class selfType) {
super(actual, selfType);
}
public S isChecked() {
isNotNull();
assertThat(actual.isChecked()) //
.overridingErrorMessage("Expected checked but was not checked.") //
.isTrue();
return myself;
}
public S isNotChecked() {
isNotNull();
assertThat(actual.isChecked()) //
.overridingErrorMessage("Expected not checked but was checked.") //
.isFalse();
return myself;
}
}