
org.fest.assertions.api.android.widget.ChronometerAssert 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.
The newest version!
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.widget;
import android.widget.Chronometer;
import static org.fest.assertions.api.Assertions.assertThat;
public class ChronometerAssert extends AbstractTextViewAssert {
public ChronometerAssert(Chronometer actual) {
super(actual, ChronometerAssert.class);
}
public ChronometerAssert hasBase(long base) {
isNotNull();
long actualBase = actual.getBase();
assertThat(actualBase) //
.overridingErrorMessage("Expected base time <%s> but was <%s>.", base, actualBase) //
.isEqualTo(base);
return this;
}
public ChronometerAssert hasFormat(String format) {
isNotNull();
String actualFormat = actual.getFormat();
assertThat(actualFormat) //
.overridingErrorMessage("Expected format <%s> but was <%s>.", format, actualFormat) //
.isEqualTo(format);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy