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

com.foursoft.vecmodel.vec120.AbstractVecDimensionAnchorAssert 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;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}