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

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

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

  /**
   * Verifies that the actual VecComplexProperty's customProperties contains the given VecCustomProperty elements.
   * @param customProperties the given elements that should be contained in actual VecComplexProperty's customProperties.
   * @return this assertion object.
   * @throws AssertionError if the actual VecComplexProperty's customProperties does not contain all given VecCustomProperty elements.
   */
  public S hasCustomProperties(VecCustomProperty... customProperties) {
    // check that actual VecComplexProperty 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 VecComplexProperty's customProperties contains the given VecCustomProperty elements in Collection.
   * @param customProperties the given elements that should be contained in actual VecComplexProperty's customProperties.
   * @return this assertion object.
   * @throws AssertionError if the actual VecComplexProperty's customProperties does not contain all given VecCustomProperty elements.
   */
  public S hasCustomProperties(java.util.Collection customProperties) {
    // check that actual VecComplexProperty 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 VecComplexProperty'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 VecComplexProperty's customProperties.
   * @return this assertion object.
   * @throws AssertionError if the actual VecComplexProperty's customProperties does not contain all given VecCustomProperty elements.
   */
  public S hasOnlyCustomProperties(VecCustomProperty... customProperties) {
    // check that actual VecComplexProperty 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 VecComplexProperty'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 VecComplexProperty's customProperties.
   * @return this assertion object.
   * @throws AssertionError if the actual VecComplexProperty's customProperties does not contain all given VecCustomProperty elements.
   */
  public S hasOnlyCustomProperties(java.util.Collection customProperties) {
    // check that actual VecComplexProperty 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 VecComplexProperty's customProperties does not contain the given VecCustomProperty elements.
   *
   * @param customProperties the given elements that should not be in actual VecComplexProperty's customProperties.
   * @return this assertion object.
   * @throws AssertionError if the actual VecComplexProperty's customProperties contains any given VecCustomProperty elements.
   */
  public S doesNotHaveCustomProperties(VecCustomProperty... customProperties) {
    // check that actual VecComplexProperty 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 VecComplexProperty's customProperties does not contain the given VecCustomProperty elements in Collection.
   *
   * @param customProperties the given elements that should not be in actual VecComplexProperty's customProperties.
   * @return this assertion object.
   * @throws AssertionError if the actual VecComplexProperty's customProperties contains any given VecCustomProperty elements.
   */
  public S doesNotHaveCustomProperties(java.util.Collection customProperties) {
    // check that actual VecComplexProperty 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 VecComplexProperty has no customProperties.
   * @return this assertion object.
   * @throws AssertionError if the actual VecComplexProperty's customProperties is not empty.
   */
  public S hasNoCustomProperties() {
    // check that actual VecComplexProperty 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;
  }


}