org.fest.assertions.api.android.widget.RadioGroupAssert 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.
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.widget;
import android.widget.RadioGroup;
import static org.fest.assertions.api.Assertions.assertThat;
/** Assertions for {@link RadioGroup} instances. */
public class RadioGroupAssert extends AbstractLinearLayoutAssert {
public RadioGroupAssert(RadioGroup actual) {
super(actual, RadioGroupAssert.class);
}
public RadioGroupAssert hasCheckedRadioButtonId(int id) {
isNotNull();
int actualId = actual.getCheckedRadioButtonId();
assertThat(actualId) //
.overridingErrorMessage("Expected checked radio button ID <%s> but was <%s>.", id,
actualId) //
.isEqualTo(id);
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy