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

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

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

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

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

    // null safe check
    VecGeometrySegment3D actualParentGeometrySegment3D = actual.getParentGeometrySegment3D();
    if (!Objects.areEqual(actualParentGeometrySegment3D, parentGeometrySegment3D)) {
      failWithMessage(assertjErrorMessage, actual, parentGeometrySegment3D, actualParentGeometrySegment3D);
    }

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

}