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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecWireReceptionSpecification actualParentWireReceptionSpecification = actual.getParentWireReceptionSpecification();
    if (!Objects.areEqual(actualParentWireReceptionSpecification, parentWireReceptionSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentWireReceptionSpecification, actualParentWireReceptionSpecification);
    }

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

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

}