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

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

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

  /**
   * Verifies that the actual VecUsageConstraint's fromDate is equal to the given one.
   * @param fromDate the given fromDate to compare the actual VecUsageConstraint's fromDate to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecUsageConstraint's fromDate is not equal to the given one.
   */
  public S hasFromDate(javax.xml.datatype.XMLGregorianCalendar fromDate) {
    // check that actual VecUsageConstraint we want to make assertions on is not null.
    isNotNull();

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

    // null safe check
    javax.xml.datatype.XMLGregorianCalendar actualFromDate = actual.getFromDate();
    if (!Objects.areEqual(actualFromDate, fromDate)) {
      failWithMessage(assertjErrorMessage, actual, fromDate, actualFromDate);
    }

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

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

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

    // null safe check
    String actualFromSerialNumber = actual.getFromSerialNumber();
    if (!Objects.areEqual(actualFromSerialNumber, fromSerialNumber)) {
      failWithMessage(assertjErrorMessage, actual, fromSerialNumber, actualFromSerialNumber);
    }

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

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

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

    // null safe check
    VecUsageConstraintSpecification actualParentUsageConstraintSpecification = actual.getParentUsageConstraintSpecification();
    if (!Objects.areEqual(actualParentUsageConstraintSpecification, parentUsageConstraintSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentUsageConstraintSpecification, actualParentUsageConstraintSpecification);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


  /**
   * Verifies that the actual VecUsageConstraint's toDate is equal to the given one.
   * @param toDate the given toDate to compare the actual VecUsageConstraint's toDate to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecUsageConstraint's toDate is not equal to the given one.
   */
  public S hasToDate(javax.xml.datatype.XMLGregorianCalendar toDate) {
    // check that actual VecUsageConstraint we want to make assertions on is not null.
    isNotNull();

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

    // null safe check
    javax.xml.datatype.XMLGregorianCalendar actualToDate = actual.getToDate();
    if (!Objects.areEqual(actualToDate, toDate)) {
      failWithMessage(assertjErrorMessage, actual, toDate, actualToDate);
    }

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

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

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

    // null safe check
    String actualToSerialNumber = actual.getToSerialNumber();
    if (!Objects.areEqual(actualToSerialNumber, toSerialNumber)) {
      failWithMessage(assertjErrorMessage, actual, toSerialNumber, actualToSerialNumber);
    }

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

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

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

    // null safe check
    VecUsageConstraintType actualType = actual.getType();
    if (!Objects.areEqual(actualType, type)) {
      failWithMessage(assertjErrorMessage, actual, type, actualType);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}