org.assertj.android.api.telephony.CellSignalStrengthLteAssert 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!
package org.assertj.android.api.telephony;
import android.annotation.TargetApi;
import android.telephony.CellSignalStrengthLte;
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import static org.assertj.core.api.Assertions.assertThat;
@TargetApi(JELLY_BEAN_MR1)
public class CellSignalStrengthLteAssert extends AbstractCellSignalStrengthAssert {
public CellSignalStrengthLteAssert(CellSignalStrengthLte actual) {
super(actual, CellSignalStrengthLteAssert.class);
}
public CellSignalStrengthLteAssert hasTimingAdvance(int timingAdvance) {
isNotNull();
int actualTimingAdvance = actual.getTimingAdvance();
assertThat(actualTimingAdvance) //
.overridingErrorMessage("Expected timing advance <%s> but was <%s>.", timingAdvance, actualTimingAdvance) //
.isEqualTo(timingAdvance);
return this;
}
}