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

org.fest.assertions.api.android.graphics.InterpolatorAssert Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.graphics;

import android.graphics.Interpolator;
import org.fest.assertions.api.AbstractAssert;

import static org.fest.assertions.api.Assertions.assertThat;

/** Assertions for {@link Interpolator} instances. */
public class InterpolatorAssert extends AbstractAssert {
  public InterpolatorAssert(Interpolator actual) {
    super(actual, InterpolatorAssert.class);
  }

  public InterpolatorAssert hasKeyFrameCount(int count) {
    isNotNull();
    int actualCount = actual.getKeyFrameCount();
    assertThat(actualCount) //
        .overridingErrorMessage("Expected key frame count <%s> but was <%s>.", count, actualCount) //
        .isEqualTo(count);
    return this;
  }

  public InterpolatorAssert hasValueCount(int count) {
    isNotNull();
    int actualCount = actual.getValueCount();
    assertThat(actualCount) //
        .overridingErrorMessage("Expected value count <%s> but was <%s>.", count, actualCount) //
        .isEqualTo(count);
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy