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

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

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

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

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

    // null safe check
    VecTopologySpecification actualInnerTopolgy = actual.getInnerTopolgy();
    if (!Objects.areEqual(actualInnerTopolgy, innerTopolgy)) {
      failWithMessage(assertjErrorMessage, actual, innerTopolgy, actualInnerTopolgy);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecTopologySpecification actualOuterTopology = actual.getOuterTopology();
    if (!Objects.areEqual(actualOuterTopology, outerTopology)) {
      failWithMessage(assertjErrorMessage, actual, outerTopology, actualOuterTopology);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}