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

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

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

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

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

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

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

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

    // null safe check
    VecMultiCavityPlugSpecification actualParentMultiCavityPlugSpecification = actual.getParentMultiCavityPlugSpecification();
    if (!Objects.areEqual(actualParentMultiCavityPlugSpecification, parentMultiCavityPlugSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentMultiCavityPlugSpecification, actualParentMultiCavityPlugSpecification);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    String actualXmlId = actual.getXmlId();
    if (!Objects.areEqual(actualXmlId, xmlId)) {
      failWithMessage(assertjErrorMessage, actual, xmlId, actualXmlId);
    }

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

}