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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}