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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecTopologyNode actualReferenceNode = actual.getReferenceNode();
    if (!Objects.areEqual(actualReferenceNode, referenceNode)) {
      failWithMessage(assertjErrorMessage, actual, referenceNode, actualReferenceNode);
    }

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

}