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

com.foursoft.vecmodel.vec120.AbstractVecMeasurePointPositionAssert 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 VecMeasurePointPosition} specific assertions - Generated by CustomAssertionGenerator.
 */
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecMeasurePointPositionAssert, A extends VecMeasurePointPosition> extends AbstractVecLocalPositionAssert {

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

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

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

    // null safe check
    VecMeasurementPoint actualMeasurementPoint = actual.getMeasurementPoint();
    if (!Objects.areEqual(actualMeasurementPoint, measurementPoint)) {
      failWithMessage(assertjErrorMessage, actual, measurementPoint, actualMeasurementPoint);
    }

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

}