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

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

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

  /**
   * Verifies that the actual VecAbstractSlot's coding is equal to the given one.
   * @param coding the given coding to compare the actual VecAbstractSlot's coding to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecAbstractSlot's coding is not equal to the given one.
   */
  public S hasCoding(VecCoding coding) {
    // check that actual VecAbstractSlot 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
    VecCoding 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 VecAbstractSlot's parentConnectorHousingSpecification is equal to the given one.
   * @param parentConnectorHousingSpecification the given parentConnectorHousingSpecification to compare the actual VecAbstractSlot's parentConnectorHousingSpecification to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecAbstractSlot's parentConnectorHousingSpecification is not equal to the given one.
   */
  public S hasParentConnectorHousingSpecification(VecConnectorHousingSpecification parentConnectorHousingSpecification) {
    // check that actual VecAbstractSlot 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;
  }

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

    // check that given VecAbstractSlotReference varargs is not null.
    if (refAbstractSlotReference == null) failWithMessage("Expecting refAbstractSlotReference 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.getRefAbstractSlotReference(), refAbstractSlotReference);

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

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

    // check that given VecAbstractSlotReference collection is not null.
    if (refAbstractSlotReference == null) {
      failWithMessage("Expecting refAbstractSlotReference 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.getRefAbstractSlotReference(), refAbstractSlotReference.toArray());

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

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

    // check that given VecAbstractSlotReference varargs is not null.
    if (refAbstractSlotReference == null) failWithMessage("Expecting refAbstractSlotReference 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.getRefAbstractSlotReference(), refAbstractSlotReference);

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

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

    // check that given VecAbstractSlotReference collection is not null.
    if (refAbstractSlotReference == null) {
      failWithMessage("Expecting refAbstractSlotReference 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.getRefAbstractSlotReference(), refAbstractSlotReference.toArray());

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

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

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

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

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

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

    // check that given VecAbstractSlotReference collection is not null.
    if (refAbstractSlotReference == null) {
      failWithMessage("Expecting refAbstractSlotReference 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.getRefAbstractSlotReference(), refAbstractSlotReference.toArray());

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

  /**
   * Verifies that the actual VecAbstractSlot has no refAbstractSlotReference.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAbstractSlot's refAbstractSlotReference is not empty.
   */
  public S hasNoRefAbstractSlotReference() {
    // check that actual VecAbstractSlot 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 refAbstractSlotReference but had :\n  <%s>";

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

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


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

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

    // null safe check
    String actualSlotNumber = actual.getSlotNumber();
    if (!Objects.areEqual(actualSlotNumber, slotNumber)) {
      failWithMessage(assertjErrorMessage, actual, slotNumber, actualSlotNumber);
    }

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

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

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

    // null safe check
    VecSlotSpecification actualSlotSpecification = actual.getSlotSpecification();
    if (!Objects.areEqual(actualSlotSpecification, slotSpecification)) {
      failWithMessage(assertjErrorMessage, actual, slotSpecification, actualSlotSpecification);
    }

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

}