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

com.foursoft.vecmodel.vec120.AbstractVecCouplingPointAssert Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.foursoft.vecmodel.vec120;

import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;

/**
 * Abstract base class for {@link VecCouplingPoint} specific assertions - Generated by CustomAssertionGenerator.
 */
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecCouplingPointAssert, A extends VecCouplingPoint> extends AbstractVecConfigurableElementAssert {

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

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

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

    // null safe check
    VecConnectorHousingRole actualFirstConnector = actual.getFirstConnector();
    if (!Objects.areEqual(actualFirstConnector, firstConnector)) {
      failWithMessage(assertjErrorMessage, actual, firstConnector, actualFirstConnector);
    }

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

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

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

    // null safe check
    String actualIdentification = actual.getIdentification();
    if (!Objects.areEqual(actualIdentification, identification)) {
      failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
    }

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

  /**
   * Verifies that the actual VecCouplingPoint's matingPoints contains the given VecMatingPoint elements.
   * @param matingPoints the given elements that should be contained in actual VecCouplingPoint's matingPoints.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's matingPoints does not contain all given VecMatingPoint elements.
   */
  public S hasMatingPoints(VecMatingPoint... matingPoints) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecMatingPoint varargs is not null.
    if (matingPoints == null) failWithMessage("Expecting matingPoints parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getMatingPoints(), matingPoints);

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

  /**
   * Verifies that the actual VecCouplingPoint's matingPoints contains the given VecMatingPoint elements in Collection.
   * @param matingPoints the given elements that should be contained in actual VecCouplingPoint's matingPoints.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's matingPoints does not contain all given VecMatingPoint elements.
   */
  public S hasMatingPoints(java.util.Collection matingPoints) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecMatingPoint collection is not null.
    if (matingPoints == null) {
      failWithMessage("Expecting matingPoints parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getMatingPoints(), matingPoints.toArray());

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

  /**
   * Verifies that the actual VecCouplingPoint's matingPoints contains only the given VecMatingPoint elements and nothing else in whatever order.
   * @param matingPoints the given elements that should be contained in actual VecCouplingPoint's matingPoints.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's matingPoints does not contain all given VecMatingPoint elements.
   */
  public S hasOnlyMatingPoints(VecMatingPoint... matingPoints) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecMatingPoint varargs is not null.
    if (matingPoints == null) failWithMessage("Expecting matingPoints parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getMatingPoints(), matingPoints);

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

  /**
   * Verifies that the actual VecCouplingPoint's matingPoints contains only the given VecMatingPoint elements in Collection and nothing else in whatever order.
   * @param matingPoints the given elements that should be contained in actual VecCouplingPoint's matingPoints.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's matingPoints does not contain all given VecMatingPoint elements.
   */
  public S hasOnlyMatingPoints(java.util.Collection matingPoints) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecMatingPoint collection is not null.
    if (matingPoints == null) {
      failWithMessage("Expecting matingPoints parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getMatingPoints(), matingPoints.toArray());

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

  /**
   * Verifies that the actual VecCouplingPoint's matingPoints does not contain the given VecMatingPoint elements.
   *
   * @param matingPoints the given elements that should not be in actual VecCouplingPoint's matingPoints.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's matingPoints contains any given VecMatingPoint elements.
   */
  public S doesNotHaveMatingPoints(VecMatingPoint... matingPoints) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecMatingPoint varargs is not null.
    if (matingPoints == null) failWithMessage("Expecting matingPoints parameter not to be null.");

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getMatingPoints(), matingPoints);

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

  /**
   * Verifies that the actual VecCouplingPoint's matingPoints does not contain the given VecMatingPoint elements in Collection.
   *
   * @param matingPoints the given elements that should not be in actual VecCouplingPoint's matingPoints.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's matingPoints contains any given VecMatingPoint elements.
   */
  public S doesNotHaveMatingPoints(java.util.Collection matingPoints) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecMatingPoint collection is not null.
    if (matingPoints == null) {
      failWithMessage("Expecting matingPoints parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getMatingPoints(), matingPoints.toArray());

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

  /**
   * Verifies that the actual VecCouplingPoint has no matingPoints.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's matingPoints is not empty.
   */
  public S hasNoMatingPoints() {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // we override the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting :\n  <%s>\nnot to have matingPoints but had :\n  <%s>";

    // check
    if (actual.getMatingPoints().iterator().hasNext()) {
      failWithMessage(assertjErrorMessage, actual, actual.getMatingPoints());
    }

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


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

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

    // null safe check
    VecCouplingSpecification actualParentCouplingSpecification = actual.getParentCouplingSpecification();
    if (!Objects.areEqual(actualParentCouplingSpecification, parentCouplingSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentCouplingSpecification, actualParentCouplingSpecification);
    }

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

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

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

    // null safe check
    VecConnectorHousingRole actualSecondConnector = actual.getSecondConnector();
    if (!Objects.areEqual(actualSecondConnector, secondConnector)) {
      failWithMessage(assertjErrorMessage, actual, secondConnector, actualSecondConnector);
    }

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

  /**
   * Verifies that the actual VecCouplingPoint's slotCouplings contains the given VecSlotCoupling elements.
   * @param slotCouplings the given elements that should be contained in actual VecCouplingPoint's slotCouplings.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's slotCouplings does not contain all given VecSlotCoupling elements.
   */
  public S hasSlotCouplings(VecSlotCoupling... slotCouplings) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecSlotCoupling varargs is not null.
    if (slotCouplings == null) failWithMessage("Expecting slotCouplings parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getSlotCouplings(), slotCouplings);

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

  /**
   * Verifies that the actual VecCouplingPoint's slotCouplings contains the given VecSlotCoupling elements in Collection.
   * @param slotCouplings the given elements that should be contained in actual VecCouplingPoint's slotCouplings.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's slotCouplings does not contain all given VecSlotCoupling elements.
   */
  public S hasSlotCouplings(java.util.Collection slotCouplings) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecSlotCoupling collection is not null.
    if (slotCouplings == null) {
      failWithMessage("Expecting slotCouplings parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getSlotCouplings(), slotCouplings.toArray());

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

  /**
   * Verifies that the actual VecCouplingPoint's slotCouplings contains only the given VecSlotCoupling elements and nothing else in whatever order.
   * @param slotCouplings the given elements that should be contained in actual VecCouplingPoint's slotCouplings.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's slotCouplings does not contain all given VecSlotCoupling elements.
   */
  public S hasOnlySlotCouplings(VecSlotCoupling... slotCouplings) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecSlotCoupling varargs is not null.
    if (slotCouplings == null) failWithMessage("Expecting slotCouplings parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getSlotCouplings(), slotCouplings);

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

  /**
   * Verifies that the actual VecCouplingPoint's slotCouplings contains only the given VecSlotCoupling elements in Collection and nothing else in whatever order.
   * @param slotCouplings the given elements that should be contained in actual VecCouplingPoint's slotCouplings.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's slotCouplings does not contain all given VecSlotCoupling elements.
   */
  public S hasOnlySlotCouplings(java.util.Collection slotCouplings) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecSlotCoupling collection is not null.
    if (slotCouplings == null) {
      failWithMessage("Expecting slotCouplings parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getSlotCouplings(), slotCouplings.toArray());

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

  /**
   * Verifies that the actual VecCouplingPoint's slotCouplings does not contain the given VecSlotCoupling elements.
   *
   * @param slotCouplings the given elements that should not be in actual VecCouplingPoint's slotCouplings.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's slotCouplings contains any given VecSlotCoupling elements.
   */
  public S doesNotHaveSlotCouplings(VecSlotCoupling... slotCouplings) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecSlotCoupling varargs is not null.
    if (slotCouplings == null) failWithMessage("Expecting slotCouplings parameter not to be null.");

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getSlotCouplings(), slotCouplings);

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

  /**
   * Verifies that the actual VecCouplingPoint's slotCouplings does not contain the given VecSlotCoupling elements in Collection.
   *
   * @param slotCouplings the given elements that should not be in actual VecCouplingPoint's slotCouplings.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's slotCouplings contains any given VecSlotCoupling elements.
   */
  public S doesNotHaveSlotCouplings(java.util.Collection slotCouplings) {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // check that given VecSlotCoupling collection is not null.
    if (slotCouplings == null) {
      failWithMessage("Expecting slotCouplings parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getSlotCouplings(), slotCouplings.toArray());

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

  /**
   * Verifies that the actual VecCouplingPoint has no slotCouplings.
   * @return this assertion object.
   * @throws AssertionError if the actual VecCouplingPoint's slotCouplings is not empty.
   */
  public S hasNoSlotCouplings() {
    // check that actual VecCouplingPoint we want to make assertions on is not null.
    isNotNull();

    // we override the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting :\n  <%s>\nnot to have slotCouplings but had :\n  <%s>";

    // check
    if (actual.getSlotCouplings().iterator().hasNext()) {
      failWithMessage(assertjErrorMessage, actual, actual.getSlotCouplings());
    }

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


}