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

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

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

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

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

    // null safe check
    VecCavityAccessorySpecification actualCavityAccessorySpecification = actual.getCavityAccessorySpecification();
    if (!Objects.areEqual(actualCavityAccessorySpecification, cavityAccessorySpecification)) {
      failWithMessage(assertjErrorMessage, actual, cavityAccessorySpecification, actualCavityAccessorySpecification);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}