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

org.assertj.android.api.animation.PropertyValuesHolderAssert Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
// Copyright 2013 Square, Inc.
package org.assertj.android.api.animation;

import android.animation.PropertyValuesHolder;
import android.annotation.TargetApi;
import org.assertj.core.api.AbstractAssert;

import static android.os.Build.VERSION_CODES.HONEYCOMB;
import static org.assertj.core.api.Assertions.assertThat;

/** Assertions for {@link PropertyValuesHolder} instances. */
@TargetApi(HONEYCOMB)
public class PropertyValuesHolderAssert
    extends AbstractAssert {
  public PropertyValuesHolderAssert(PropertyValuesHolder actual) {
    super(actual, PropertyValuesHolderAssert.class);
  }

  public PropertyValuesHolderAssert hasPropertyName(String name) {
    isNotNull();
    String actualName = actual.getPropertyName();
    assertThat(actualName) //
        .overridingErrorMessage("Expected property name <%s> but was <%s>.", name, actualName) //
        .isEqualTo(name);
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy