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

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

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

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

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

    // null safe check
    VecNumericalValue actualOutsideDiameter = actual.getOutsideDiameter();
    if (!Objects.areEqual(actualOutsideDiameter, outsideDiameter)) {
      failWithMessage(assertjErrorMessage, actual, outsideDiameter, actualOutsideDiameter);
    }

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

}