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

com.foursoft.vecmodel.vec120.AbstractVecRoutingSpecificationAssert 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;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}