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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}