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

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

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

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

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

    // null safe check
    String actualCoding = actual.getCoding();
    if (!Objects.areEqual(actualCoding, coding)) {
      failWithMessage(assertjErrorMessage, actual, coding, actualCoding);
    }

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

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

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

    // null safe check
    VecAbstractSlot actualParentAbstractSlot = actual.getParentAbstractSlot();
    if (!Objects.areEqual(actualParentAbstractSlot, parentAbstractSlot)) {
      failWithMessage(assertjErrorMessage, actual, parentAbstractSlot, actualParentAbstractSlot);
    }

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

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

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

    // null safe check
    VecConnectorHousingSpecification actualParentConnectorHousingSpecification = actual.getParentConnectorHousingSpecification();
    if (!Objects.areEqual(actualParentConnectorHousingSpecification, parentConnectorHousingSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentConnectorHousingSpecification, actualParentConnectorHousingSpecification);
    }

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

}