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

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

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

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

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

    // null safe check
    String actualLengthType = actual.getLengthType();
    if (!Objects.areEqual(actualLengthType, lengthType)) {
      failWithMessage(assertjErrorMessage, actual, lengthType, actualLengthType);
    }

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

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

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

    // null safe check
    VecNumericalValue actualLengthValue = actual.getLengthValue();
    if (!Objects.areEqual(actualLengthValue, lengthValue)) {
      failWithMessage(assertjErrorMessage, actual, lengthValue, actualLengthValue);
    }

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

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

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

    // null safe check
    VecWireElementReference actualParentWireElementReference = actual.getParentWireElementReference();
    if (!Objects.areEqual(actualParentWireElementReference, parentWireElementReference)) {
      failWithMessage(assertjErrorMessage, actual, parentWireElementReference, actualParentWireElementReference);
    }

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

}