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

com.foursoft.vecmodel.vec120.AbstractVecExtendableElementAssert Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.foursoft.vecmodel.vec120;

import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    String actualXmlId = actual.getXmlId();
    if (!Objects.areEqual(actualXmlId, xmlId)) {
      failWithMessage(assertjErrorMessage, actual, xmlId, actualXmlId);
    }

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

}