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

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

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

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

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

    // null safe check
    String actualFuseType = actual.getFuseType();
    if (!Objects.areEqual(actualFuseType, fuseType)) {
      failWithMessage(assertjErrorMessage, actual, fuseType, actualFuseType);
    }

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

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

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

    // null safe check
    VecNumericalValue actualIMax = actual.getIMax();
    if (!Objects.areEqual(actualIMax, iMax)) {
      failWithMessage(assertjErrorMessage, actual, iMax, actualIMax);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


}