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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

    // null safe check
    VecFuseSpecification actualFuseSpecification = actual.getFuseSpecification();
    if (!Objects.areEqual(actualFuseSpecification, fuseSpecification)) {
      failWithMessage(assertjErrorMessage, actual, fuseSpecification, actualFuseSpecification);
    }

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

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

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

    // null safe check
    String actualIdentification = actual.getIdentification();
    if (!Objects.areEqual(actualIdentification, identification)) {
      failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
    }

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

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

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

    // null safe check
    VecMultiFuseSpecification actualParentMultiFuseSpecification = actual.getParentMultiFuseSpecification();
    if (!Objects.areEqual(actualParentMultiFuseSpecification, parentMultiFuseSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentMultiFuseSpecification, actualParentMultiFuseSpecification);
    }

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

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

}