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

com.foursoft.vecmodel.vec120.AbstractVecConfigurableElementAssert 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;
import org.assertj.core.util.Objects;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


  /**
   * Verifies that the actual VecConfigurableElement's configInfo is equal to the given one.
   * @param configInfo the given configInfo to compare the actual VecConfigurableElement's configInfo to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecConfigurableElement's configInfo is not equal to the given one.
   */
  public S hasConfigInfo(VecVariantConfiguration configInfo) {
    // check that actual VecConfigurableElement we want to make assertions on is not null.
    isNotNull();

    // overrides the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting configInfo of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

    // null safe check
    VecVariantConfiguration actualConfigInfo = actual.getConfigInfo();
    if (!Objects.areEqual(actualConfigInfo, configInfo)) {
      failWithMessage(assertjErrorMessage, actual, configInfo, actualConfigInfo);
    }

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

}