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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    String actualIdentificationA = actual.getIdentificationA();
    if (!Objects.areEqual(actualIdentificationA, identificationA)) {
      failWithMessage(assertjErrorMessage, actual, identificationA, actualIdentificationA);
    }

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

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

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

    // null safe check
    String actualIdentificationB = actual.getIdentificationB();
    if (!Objects.areEqual(actualIdentificationB, identificationB)) {
      failWithMessage(assertjErrorMessage, actual, identificationB, actualIdentificationB);
    }

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

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

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

    // null safe check
    VecMapping actualParentMapping = actual.getParentMapping();
    if (!Objects.areEqual(actualParentMapping, parentMapping)) {
      failWithMessage(assertjErrorMessage, actual, parentMapping, actualParentMapping);
    }

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

  /**
   * Verifies that the actual VecSlotMapping's xmlId is equal to the given one.
   * @param xmlId the given xmlId to compare the actual VecSlotMapping's xmlId to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecSlotMapping's xmlId is not equal to the given one.
   */
  public S hasXmlId(String xmlId) {
    // check that actual VecSlotMapping 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;
  }

}