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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecWireReceptionSpecification actualWireReceptionSpecification = actual.getWireReceptionSpecification();
    if (!Objects.areEqual(actualWireReceptionSpecification, wireReceptionSpecification)) {
      failWithMessage(assertjErrorMessage, actual, wireReceptionSpecification, actualWireReceptionSpecification);
    }

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

}