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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}