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

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

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

  /**
   * Verifies that the actual VecAbstractSlotReference's identification is equal to the given one.
   * @param identification the given identification to compare the actual VecAbstractSlotReference's identification to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecAbstractSlotReference's identification is not equal to the given one.
   */
  public S hasIdentification(String identification) {
    // check that actual VecAbstractSlotReference 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 VecAbstractSlotReference's parentConnectorHousingRole is equal to the given one.
   * @param parentConnectorHousingRole the given parentConnectorHousingRole to compare the actual VecAbstractSlotReference's parentConnectorHousingRole to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecAbstractSlotReference's parentConnectorHousingRole is not equal to the given one.
   */
  public S hasParentConnectorHousingRole(VecConnectorHousingRole parentConnectorHousingRole) {
    // check that actual VecAbstractSlotReference we want to make assertions on is not null.
    isNotNull();

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

    // null safe check
    VecConnectorHousingRole actualParentConnectorHousingRole = actual.getParentConnectorHousingRole();
    if (!Objects.areEqual(actualParentConnectorHousingRole, parentConnectorHousingRole)) {
      failWithMessage(assertjErrorMessage, actual, parentConnectorHousingRole, actualParentConnectorHousingRole);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecAbstractSlot actualReferencedSlot = actual.getReferencedSlot();
    if (!Objects.areEqual(actualReferencedSlot, referencedSlot)) {
      failWithMessage(assertjErrorMessage, actual, referencedSlot, actualReferencedSlot);
    }

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

}