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

com.foursoft.vecmodel.vec120.AbstractVecIntegerValuePropertyAssert Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.foursoft.vecmodel.vec120;

import org.assertj.core.util.Objects;

/**
 * Abstract base class for {@link VecIntegerValueProperty} specific assertions - Generated by CustomAssertionGenerator.
 */
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecIntegerValuePropertyAssert, A extends VecIntegerValueProperty> extends AbstractVecCustomPropertyAssert {

  /**
   * Creates a new {@link AbstractVecIntegerValuePropertyAssert} to make assertions on actual VecIntegerValueProperty.
   * @param actual the VecIntegerValueProperty we want to make assertions on.
   */
  protected AbstractVecIntegerValuePropertyAssert(A actual, Class selfType) {
    super(actual, selfType);
  }

  /**
   * Verifies that the actual VecIntegerValueProperty's value is equal to the given one.
   * @param value the given value to compare the actual VecIntegerValueProperty's value to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecIntegerValueProperty's value is not equal to the given one.
   */
  public S hasValue(java.math.BigInteger value) {
    // check that actual VecIntegerValueProperty we want to make assertions on is not null.
    isNotNull();

    // overrides the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting value of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

    // null safe check
    java.math.BigInteger actualValue = actual.getValue();
    if (!Objects.areEqual(actualValue, value)) {
      failWithMessage(assertjErrorMessage, actual, value, actualValue);
    }

    // return the current assertion for method chaining
    return myself;
  }

}