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

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

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

  /**
   * Verifies that the actual VecStripeSpecification's length is equal to the given one.
   * @param length the given length to compare the actual VecStripeSpecification's length to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecStripeSpecification's length is not equal to the given one.
   */
  public S hasLength(VecNumericalValue length) {
    // check that actual VecStripeSpecification 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 VecStripeSpecification's segmentDiameter is equal to the given one.
   * @param segmentDiameter the given segmentDiameter to compare the actual VecStripeSpecification's segmentDiameter to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecStripeSpecification's segmentDiameter is not equal to the given one.
   */
  public S hasSegmentDiameter(VecValueRange segmentDiameter) {
    // check that actual VecStripeSpecification we want to make assertions on is not null.
    isNotNull();

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

    // null safe check
    VecValueRange actualSegmentDiameter = actual.getSegmentDiameter();
    if (!Objects.areEqual(actualSegmentDiameter, segmentDiameter)) {
      failWithMessage(assertjErrorMessage, actual, segmentDiameter, actualSegmentDiameter);
    }

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

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

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

    // null safe check
    VecNumericalValue actualThickness = actual.getThickness();
    if (!Objects.areEqual(actualThickness, thickness)) {
      failWithMessage(assertjErrorMessage, actual, thickness, actualThickness);
    }

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

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

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

    // null safe check
    VecNumericalValue actualWidth = actual.getWidth();
    if (!Objects.areEqual(actualWidth, width)) {
      failWithMessage(assertjErrorMessage, actual, width, actualWidth);
    }

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

}