All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fest.assertions.api.android.widget.ChronometerAssert Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show 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 - 2024 Weber Informatics LLC | Privacy Policy