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

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

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

  /**
   * Verifies that the actual VecRouting's identification is equal to the given one.
   * @param identification the given identification to compare the actual VecRouting's identification to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecRouting's identification is not equal to the given one.
   */
  public S hasIdentification(String identification) {
    // check that actual VecRouting 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 VecRouting's mandatorySegment contains the given VecTopologySegment elements.
   * @param mandatorySegment the given elements that should be contained in actual VecRouting's mandatorySegment.
   * @return this assertion object.
   * @throws AssertionError if the actual VecRouting's mandatorySegment does not contain all given VecTopologySegment elements.
   */
  public S hasMandatorySegment(VecTopologySegment... mandatorySegment) {
    // check that actual VecRouting we want to make assertions on is not null.
    isNotNull();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecRoutingSpecification actualParentRoutingSpecification = actual.getParentRoutingSpecification();
    if (!Objects.areEqual(actualParentRoutingSpecification, parentRoutingSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentRoutingSpecification, actualParentRoutingSpecification);
    }

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

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

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

    // null safe check
    VecPath actualPath = actual.getPath();
    if (!Objects.areEqual(actualPath, path)) {
      failWithMessage(assertjErrorMessage, actual, path, actualPath);
    }

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

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

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

    // null safe check
    VecRoutableElement actualRoutedElement = actual.getRoutedElement();
    if (!Objects.areEqual(actualRoutedElement, routedElement)) {
      failWithMessage(assertjErrorMessage, actual, routedElement, actualRoutedElement);
    }

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

  /**
   * Verifies that the actual VecRouting is special routed.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecRouting is not special routed.
   */
  public S isSpecialRouted() {
    // check that actual VecRouting we want to make assertions on is not null.
    isNotNull();

    // null safe check
    if (Objects.areEqual(Boolean.FALSE, actual.isSpecialRouted())) {
      failWithMessage("\nExpecting that actual VecRouting is special routed but is not.");
    }

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

  /**
   * Verifies that the actual VecRouting is not special routed.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecRouting is special routed.
   */
  public S isNotSpecialRouted() {
    // check that actual VecRouting we want to make assertions on is not null.
    isNotNull();

    // null safe check
    if (Objects.areEqual(Boolean.TRUE, actual.isSpecialRouted())) {
      failWithMessage("\nExpecting that actual VecRouting is not special routed but is.");
    }

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

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

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

    // null safe check
    VecLocalizedString actualSpecialRoutedComment = actual.getSpecialRoutedComment();
    if (!Objects.areEqual(actualSpecialRoutedComment, specialRoutedComment)) {
      failWithMessage(assertjErrorMessage, actual, specialRoutedComment, actualSpecialRoutedComment);
    }

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

}