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

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

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

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

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

    // null safe check
    String actualClassification = actual.getClassification();
    if (!Objects.areEqual(actualClassification, classification)) {
      failWithMessage(assertjErrorMessage, actual, classification, actualClassification);
    }

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

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

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

    // null safe check
    VecNumericalValue actualLength = actual.getLength();
    if (!Objects.areEqual(actualLength, length)) {
      failWithMessage(assertjErrorMessage, actual, length, actualLength);
    }

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

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

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

    // null safe check
    VecTopologySegment actualParentTopologySegment = actual.getParentTopologySegment();
    if (!Objects.areEqual(actualParentTopologySegment, parentTopologySegment)) {
      failWithMessage(assertjErrorMessage, actual, parentTopologySegment, actualParentTopologySegment);
    }

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

}