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

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

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

import org.assertj.core.api.Assertions;
import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;

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

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

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

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

    // null safe check
    VecBuildingBlockPositioning2D actualParentBuildingBlockPositioning2D = actual.getParentBuildingBlockPositioning2D();
    if (!Objects.areEqual(actualParentBuildingBlockPositioning2D, parentBuildingBlockPositioning2D)) {
      failWithMessage(assertjErrorMessage, actual, parentBuildingBlockPositioning2D, actualParentBuildingBlockPositioning2D);
    }

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

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

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

    // null safe check
    VecBuildingBlockSpecification2D actualParentBuildingBlockSpecification2D = actual.getParentBuildingBlockSpecification2D();
    if (!Objects.areEqual(actualParentBuildingBlockSpecification2D, parentBuildingBlockSpecification2D)) {
      failWithMessage(assertjErrorMessage, actual, parentBuildingBlockSpecification2D, actualParentBuildingBlockSpecification2D);
    }

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refGeometryNode2D contains the given VecGeometryNode2D elements.
   * @param refGeometryNode2D the given elements that should be contained in actual VecCartesianPoint2D's refGeometryNode2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refGeometryNode2D does not contain all given VecGeometryNode2D elements.
   */
  public S hasRefGeometryNode2D(VecGeometryNode2D... refGeometryNode2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecGeometryNode2D varargs is not null.
    if (refGeometryNode2D == null) failWithMessage("Expecting refGeometryNode2D parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getRefGeometryNode2D(), refGeometryNode2D);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refGeometryNode2D contains the given VecGeometryNode2D elements in Collection.
   * @param refGeometryNode2D the given elements that should be contained in actual VecCartesianPoint2D's refGeometryNode2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refGeometryNode2D does not contain all given VecGeometryNode2D elements.
   */
  public S hasRefGeometryNode2D(java.util.Collection refGeometryNode2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecGeometryNode2D collection is not null.
    if (refGeometryNode2D == null) {
      failWithMessage("Expecting refGeometryNode2D parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getRefGeometryNode2D(), refGeometryNode2D.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refGeometryNode2D contains only the given VecGeometryNode2D elements and nothing else in whatever order.
   * @param refGeometryNode2D the given elements that should be contained in actual VecCartesianPoint2D's refGeometryNode2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refGeometryNode2D does not contain all given VecGeometryNode2D elements.
   */
  public S hasOnlyRefGeometryNode2D(VecGeometryNode2D... refGeometryNode2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecGeometryNode2D varargs is not null.
    if (refGeometryNode2D == null) failWithMessage("Expecting refGeometryNode2D parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getRefGeometryNode2D(), refGeometryNode2D);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refGeometryNode2D contains only the given VecGeometryNode2D elements in Collection and nothing else in whatever order.
   * @param refGeometryNode2D the given elements that should be contained in actual VecCartesianPoint2D's refGeometryNode2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refGeometryNode2D does not contain all given VecGeometryNode2D elements.
   */
  public S hasOnlyRefGeometryNode2D(java.util.Collection refGeometryNode2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecGeometryNode2D collection is not null.
    if (refGeometryNode2D == null) {
      failWithMessage("Expecting refGeometryNode2D parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getRefGeometryNode2D(), refGeometryNode2D.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refGeometryNode2D does not contain the given VecGeometryNode2D elements.
   *
   * @param refGeometryNode2D the given elements that should not be in actual VecCartesianPoint2D's refGeometryNode2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refGeometryNode2D contains any given VecGeometryNode2D elements.
   */
  public S doesNotHaveRefGeometryNode2D(VecGeometryNode2D... refGeometryNode2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecGeometryNode2D varargs is not null.
    if (refGeometryNode2D == null) failWithMessage("Expecting refGeometryNode2D parameter not to be null.");

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getRefGeometryNode2D(), refGeometryNode2D);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refGeometryNode2D does not contain the given VecGeometryNode2D elements in Collection.
   *
   * @param refGeometryNode2D the given elements that should not be in actual VecCartesianPoint2D's refGeometryNode2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refGeometryNode2D contains any given VecGeometryNode2D elements.
   */
  public S doesNotHaveRefGeometryNode2D(java.util.Collection refGeometryNode2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecGeometryNode2D collection is not null.
    if (refGeometryNode2D == null) {
      failWithMessage("Expecting refGeometryNode2D parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getRefGeometryNode2D(), refGeometryNode2D.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D has no refGeometryNode2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refGeometryNode2D is not empty.
   */
  public S hasNoRefGeometryNode2D() {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // we override the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting :\n  <%s>\nnot to have refGeometryNode2D but had :\n  <%s>";

    // check
    if (actual.getRefGeometryNode2D().iterator().hasNext()) {
      failWithMessage(assertjErrorMessage, actual, actual.getRefGeometryNode2D());
    }

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


  /**
   * Verifies that the actual VecCartesianPoint2D's refPathSegment contains the given VecPathSegment elements.
   * @param refPathSegment the given elements that should be contained in actual VecCartesianPoint2D's refPathSegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refPathSegment does not contain all given VecPathSegment elements.
   */
  public S hasRefPathSegment(VecPathSegment... refPathSegment) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecPathSegment varargs is not null.
    if (refPathSegment == null) failWithMessage("Expecting refPathSegment parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getRefPathSegment(), refPathSegment);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refPathSegment contains the given VecPathSegment elements in Collection.
   * @param refPathSegment the given elements that should be contained in actual VecCartesianPoint2D's refPathSegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refPathSegment does not contain all given VecPathSegment elements.
   */
  public S hasRefPathSegment(java.util.Collection refPathSegment) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecPathSegment collection is not null.
    if (refPathSegment == null) {
      failWithMessage("Expecting refPathSegment parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getRefPathSegment(), refPathSegment.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refPathSegment contains only the given VecPathSegment elements and nothing else in whatever order.
   * @param refPathSegment the given elements that should be contained in actual VecCartesianPoint2D's refPathSegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refPathSegment does not contain all given VecPathSegment elements.
   */
  public S hasOnlyRefPathSegment(VecPathSegment... refPathSegment) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecPathSegment varargs is not null.
    if (refPathSegment == null) failWithMessage("Expecting refPathSegment parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getRefPathSegment(), refPathSegment);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refPathSegment contains only the given VecPathSegment elements in Collection and nothing else in whatever order.
   * @param refPathSegment the given elements that should be contained in actual VecCartesianPoint2D's refPathSegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refPathSegment does not contain all given VecPathSegment elements.
   */
  public S hasOnlyRefPathSegment(java.util.Collection refPathSegment) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecPathSegment collection is not null.
    if (refPathSegment == null) {
      failWithMessage("Expecting refPathSegment parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getRefPathSegment(), refPathSegment.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refPathSegment does not contain the given VecPathSegment elements.
   *
   * @param refPathSegment the given elements that should not be in actual VecCartesianPoint2D's refPathSegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refPathSegment contains any given VecPathSegment elements.
   */
  public S doesNotHaveRefPathSegment(VecPathSegment... refPathSegment) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecPathSegment varargs is not null.
    if (refPathSegment == null) failWithMessage("Expecting refPathSegment parameter not to be null.");

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getRefPathSegment(), refPathSegment);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refPathSegment does not contain the given VecPathSegment elements in Collection.
   *
   * @param refPathSegment the given elements that should not be in actual VecCartesianPoint2D's refPathSegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refPathSegment contains any given VecPathSegment elements.
   */
  public S doesNotHaveRefPathSegment(java.util.Collection refPathSegment) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecPathSegment collection is not null.
    if (refPathSegment == null) {
      failWithMessage("Expecting refPathSegment parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getRefPathSegment(), refPathSegment.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D has no refPathSegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refPathSegment is not empty.
   */
  public S hasNoRefPathSegment() {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // we override the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting :\n  <%s>\nnot to have refPathSegment but had :\n  <%s>";

    // check
    if (actual.getRefPathSegment().iterator().hasNext()) {
      failWithMessage(assertjErrorMessage, actual, actual.getRefPathSegment());
    }

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


  /**
   * Verifies that the actual VecCartesianPoint2D's refTransformation2D contains the given VecTransformation2D elements.
   * @param refTransformation2D the given elements that should be contained in actual VecCartesianPoint2D's refTransformation2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refTransformation2D does not contain all given VecTransformation2D elements.
   */
  public S hasRefTransformation2D(VecTransformation2D... refTransformation2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecTransformation2D varargs is not null.
    if (refTransformation2D == null) failWithMessage("Expecting refTransformation2D parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getRefTransformation2D(), refTransformation2D);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refTransformation2D contains the given VecTransformation2D elements in Collection.
   * @param refTransformation2D the given elements that should be contained in actual VecCartesianPoint2D's refTransformation2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refTransformation2D does not contain all given VecTransformation2D elements.
   */
  public S hasRefTransformation2D(java.util.Collection refTransformation2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecTransformation2D collection is not null.
    if (refTransformation2D == null) {
      failWithMessage("Expecting refTransformation2D parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getRefTransformation2D(), refTransformation2D.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refTransformation2D contains only the given VecTransformation2D elements and nothing else in whatever order.
   * @param refTransformation2D the given elements that should be contained in actual VecCartesianPoint2D's refTransformation2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refTransformation2D does not contain all given VecTransformation2D elements.
   */
  public S hasOnlyRefTransformation2D(VecTransformation2D... refTransformation2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecTransformation2D varargs is not null.
    if (refTransformation2D == null) failWithMessage("Expecting refTransformation2D parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getRefTransformation2D(), refTransformation2D);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refTransformation2D contains only the given VecTransformation2D elements in Collection and nothing else in whatever order.
   * @param refTransformation2D the given elements that should be contained in actual VecCartesianPoint2D's refTransformation2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refTransformation2D does not contain all given VecTransformation2D elements.
   */
  public S hasOnlyRefTransformation2D(java.util.Collection refTransformation2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecTransformation2D collection is not null.
    if (refTransformation2D == null) {
      failWithMessage("Expecting refTransformation2D parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getRefTransformation2D(), refTransformation2D.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refTransformation2D does not contain the given VecTransformation2D elements.
   *
   * @param refTransformation2D the given elements that should not be in actual VecCartesianPoint2D's refTransformation2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refTransformation2D contains any given VecTransformation2D elements.
   */
  public S doesNotHaveRefTransformation2D(VecTransformation2D... refTransformation2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecTransformation2D varargs is not null.
    if (refTransformation2D == null) failWithMessage("Expecting refTransformation2D parameter not to be null.");

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getRefTransformation2D(), refTransformation2D);

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

  /**
   * Verifies that the actual VecCartesianPoint2D's refTransformation2D does not contain the given VecTransformation2D elements in Collection.
   *
   * @param refTransformation2D the given elements that should not be in actual VecCartesianPoint2D's refTransformation2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refTransformation2D contains any given VecTransformation2D elements.
   */
  public S doesNotHaveRefTransformation2D(java.util.Collection refTransformation2D) {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // check that given VecTransformation2D collection is not null.
    if (refTransformation2D == null) {
      failWithMessage("Expecting refTransformation2D parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getRefTransformation2D(), refTransformation2D.toArray());

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

  /**
   * Verifies that the actual VecCartesianPoint2D has no refTransformation2D.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCartesianPoint2D's refTransformation2D is not empty.
   */
  public S hasNoRefTransformation2D() {
    // check that actual VecCartesianPoint2D we want to make assertions on is not null.
    isNotNull();

    // we override the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting :\n  <%s>\nnot to have refTransformation2D but had :\n  <%s>";

    // check
    if (actual.getRefTransformation2D().iterator().hasNext()) {
      failWithMessage(assertjErrorMessage, actual, actual.getRefTransformation2D());
    }

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


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

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

    // check value for x
    double actualX = actual.getX();
    if (actualX != x) {
      failWithMessage(assertjErrorMessage, actual, x, actualX);
    }

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

  /**
   * Verifies that the actual VecCartesianPoint2D's x is close to the given value by less than the given offset.
   * 

* If difference is equal to the offset value, assertion is considered successful. * @param x the value to compare the actual VecCartesianPoint2D's x to. * @param assertjOffset the given offset. * @return this assertion object. * @throws AssertionError - if the actual VecCartesianPoint2D's x is not close enough to the given value. */ public S hasXCloseTo(double x, double assertjOffset) { // check that actual VecCartesianPoint2D we want to make assertions on is not null. isNotNull(); double actualX = actual.getX(); // overrides the default error message with a more explicit one String assertjErrorMessage = String.format("\nExpecting x:\n <%s>\nto be close to:\n <%s>\nby less than <%s> but difference was <%s>", actualX, x, assertjOffset, Math.abs(x - actualX)); // check Assertions.assertThat(actualX).overridingErrorMessage(assertjErrorMessage).isCloseTo(x, Assertions.within(assertjOffset)); // return the current assertion for method chaining return myself; } /** * Verifies that the actual VecCartesianPoint2D's y is equal to the given one. * @param y the given y to compare the actual VecCartesianPoint2D's y to. * @return this assertion object. * @throws AssertionError - if the actual VecCartesianPoint2D's y is not equal to the given one. */ public S hasY(double y) { // check that actual VecCartesianPoint2D we want to make assertions on is not null. isNotNull(); // overrides the default error message with a more explicit one String assertjErrorMessage = "\nExpecting y of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>"; // check value for y double actualY = actual.getY(); if (actualY != y) { failWithMessage(assertjErrorMessage, actual, y, actualY); } // return the current assertion for method chaining return myself; } /** * Verifies that the actual VecCartesianPoint2D's y is close to the given value by less than the given offset. *

* If difference is equal to the offset value, assertion is considered successful. * @param y the value to compare the actual VecCartesianPoint2D's y to. * @param assertjOffset the given offset. * @return this assertion object. * @throws AssertionError - if the actual VecCartesianPoint2D's y is not close enough to the given value. */ public S hasYCloseTo(double y, double assertjOffset) { // check that actual VecCartesianPoint2D we want to make assertions on is not null. isNotNull(); double actualY = actual.getY(); // overrides the default error message with a more explicit one String assertjErrorMessage = String.format("\nExpecting y:\n <%s>\nto be close to:\n <%s>\nby less than <%s> but difference was <%s>", actualY, y, assertjOffset, Math.abs(y - actualY)); // check Assertions.assertThat(actualY).overridingErrorMessage(assertjErrorMessage).isCloseTo(y, Assertions.within(assertjOffset)); // return the current assertion for method chaining return myself; } }