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

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

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

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

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

    // null safe check
    VecPerson actualApprover = actual.getApprover();
    if (!Objects.areEqual(actualApprover, approver)) {
      failWithMessage(assertjErrorMessage, actual, approver, actualApprover);
    }

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

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

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

    // null safe check
    javax.xml.datatype.XMLGregorianCalendar actualChangeDate = actual.getChangeDate();
    if (!Objects.areEqual(actualChangeDate, changeDate)) {
      failWithMessage(assertjErrorMessage, actual, changeDate, actualChangeDate);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    String actualIdentification = actual.getIdentification();
    if (!Objects.areEqual(actualIdentification, identification)) {
      failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
    }

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

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

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

    // null safe check
    String actualLabel = actual.getLabel();
    if (!Objects.areEqual(actualLabel, label)) {
      failWithMessage(assertjErrorMessage, actual, label, actualLabel);
    }

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

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

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

    // null safe check
    VecItemVersion actualParentItemVersion = actual.getParentItemVersion();
    if (!Objects.areEqual(actualParentItemVersion, parentItemVersion)) {
      failWithMessage(assertjErrorMessage, actual, parentItemVersion, actualParentItemVersion);
    }

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

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

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

    // null safe check
    VecSheetOrChapter actualParentSheetOrChapter = actual.getParentSheetOrChapter();
    if (!Objects.areEqual(actualParentSheetOrChapter, parentSheetOrChapter)) {
      failWithMessage(assertjErrorMessage, actual, parentSheetOrChapter, actualParentSheetOrChapter);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecPerson actualResponsibleDesigner = actual.getResponsibleDesigner();
    if (!Objects.areEqual(actualResponsibleDesigner, responsibleDesigner)) {
      failWithMessage(assertjErrorMessage, actual, responsibleDesigner, actualResponsibleDesigner);
    }

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

}