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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}