org.fest.assertions.api.android.widget.AbstractAbsSeekBarAssert 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.graphics.drawable.Drawable;
import android.widget.AbsSeekBar;
import static org.fest.assertions.api.Assertions.assertThat;
public abstract class AbstractAbsSeekBarAssert, A extends AbsSeekBar>
extends AbstractProgressBarAssert {
protected AbstractAbsSeekBarAssert(A actual, Class selfType) {
super(actual, selfType);
}
public S hasKeyProgressIncrement(int increment) {
isNotNull();
int actualIncrement = actual.getKeyProgressIncrement();
assertThat(actualIncrement) //
.overridingErrorMessage("Expected key progress increment <%s> but was <%s>.", increment,
actualIncrement) //
.isEqualTo(increment);
return myself;
}
public S hasThumb(Drawable drawable) {
isNotNull();
Drawable actualDrawable = actual.getThumb();
assertThat(actualDrawable) //
.overridingErrorMessage("Expected thumb <%s> but was <%s>.", drawable, actualDrawable) //
.isSameAs(drawable);
return myself;
}
public S hasThumbOffset(int offset) {
isNotNull();
int actualOffset = actual.getThumbOffset();
assertThat(actualOffset) //
.overridingErrorMessage("Expected thumb offset <%s> but was <%s>.", offset, actualOffset) //
.isEqualTo(offset);
return myself;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy