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

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

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

import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.util.Objects;

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

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

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

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

    // null safe check
    VecCartesianPoint3D actualCartesianPoint = actual.getCartesianPoint();
    if (!Objects.areEqual(actualCartesianPoint, cartesianPoint)) {
      failWithMessage(assertjErrorMessage, actual, cartesianPoint, actualCartesianPoint);
    }

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

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

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

    // null safe check
    VecLocalGeometrySpecification actualParentLocalGeometrySpecification = actual.getParentLocalGeometrySpecification();
    if (!Objects.areEqual(actualParentLocalGeometrySpecification, parentLocalGeometrySpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentLocalGeometrySpecification, actualParentLocalGeometrySpecification);
    }

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

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

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

    // null safe check
    String actualXmlId = actual.getXmlId();
    if (!Objects.areEqual(actualXmlId, xmlId)) {
      failWithMessage(assertjErrorMessage, actual, xmlId, actualXmlId);
    }

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

}