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

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

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

  /**
   * Verifies that the actual VecAliasIdentification's descriptions contains the given VecAbstractLocalizedString elements.
   * @param descriptions the given elements that should be contained in actual VecAliasIdentification's descriptions.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAliasIdentification's descriptions does not contain all given VecAbstractLocalizedString elements.
   */
  public S hasDescriptions(VecAbstractLocalizedString... descriptions) {
    // check that actual VecAliasIdentification 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 VecAliasIdentification's descriptions contains the given VecAbstractLocalizedString elements in Collection.
   * @param descriptions the given elements that should be contained in actual VecAliasIdentification's descriptions.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAliasIdentification's descriptions does not contain all given VecAbstractLocalizedString elements.
   */
  public S hasDescriptions(java.util.Collection descriptions) {
    // check that actual VecAliasIdentification 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 VecAliasIdentification'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 VecAliasIdentification's descriptions.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAliasIdentification's descriptions does not contain all given VecAbstractLocalizedString elements.
   */
  public S hasOnlyDescriptions(VecAbstractLocalizedString... descriptions) {
    // check that actual VecAliasIdentification 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 VecAliasIdentification'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 VecAliasIdentification's descriptions.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAliasIdentification's descriptions does not contain all given VecAbstractLocalizedString elements.
   */
  public S hasOnlyDescriptions(java.util.Collection descriptions) {
    // check that actual VecAliasIdentification 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 VecAliasIdentification's descriptions does not contain the given VecAbstractLocalizedString elements.
   *
   * @param descriptions the given elements that should not be in actual VecAliasIdentification's descriptions.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAliasIdentification's descriptions contains any given VecAbstractLocalizedString elements.
   */
  public S doesNotHaveDescriptions(VecAbstractLocalizedString... descriptions) {
    // check that actual VecAliasIdentification 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 VecAliasIdentification's descriptions does not contain the given VecAbstractLocalizedString elements in Collection.
   *
   * @param descriptions the given elements that should not be in actual VecAliasIdentification's descriptions.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAliasIdentification's descriptions contains any given VecAbstractLocalizedString elements.
   */
  public S doesNotHaveDescriptions(java.util.Collection descriptions) {
    // check that actual VecAliasIdentification 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 VecAliasIdentification has no descriptions.
   * @return this assertion object.
   * @throws AssertionError if the actual VecAliasIdentification's descriptions is not empty.
   */
  public S hasNoDescriptions() {
    // check that actual VecAliasIdentification 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 VecAliasIdentification's identificationValue is equal to the given one.
   * @param identificationValue the given identificationValue to compare the actual VecAliasIdentification's identificationValue to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecAliasIdentification's identificationValue is not equal to the given one.
   */
  public S hasIdentificationValue(String identificationValue) {
    // check that actual VecAliasIdentification we want to make assertions on is not null.
    isNotNull();

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

    // null safe check
    String actualIdentificationValue = actual.getIdentificationValue();
    if (!Objects.areEqual(actualIdentificationValue, identificationValue)) {
      failWithMessage(assertjErrorMessage, actual, identificationValue, actualIdentificationValue);
    }

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

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

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

    // null safe check
    String actualScope = actual.getScope();
    if (!Objects.areEqual(actualScope, scope)) {
      failWithMessage(assertjErrorMessage, actual, scope, actualScope);
    }

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

  /**
   * Verifies that the actual VecAliasIdentification's type is equal to the given one.
   * @param type the given type to compare the actual VecAliasIdentification's type to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecAliasIdentification's type is not equal to the given one.
   */
  public S hasType(String type) {
    // check that actual VecAliasIdentification 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
    String 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 VecAliasIdentification's xmlId is equal to the given one.
   * @param xmlId the given xmlId to compare the actual VecAliasIdentification's xmlId to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecAliasIdentification's xmlId is not equal to the given one.
   */
  public S hasXmlId(String xmlId) {
    // check that actual VecAliasIdentification 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;
  }

}