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

com.foursoft.vecmodel.vec120.AbstractVecCapacitorSpecificationAssert Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.foursoft.vecmodel.vec120;

import org.assertj.core.util.Objects;

/**
 * Abstract base class for {@link VecCapacitorSpecification} specific assertions - Generated by CustomAssertionGenerator.
 */
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecCapacitorSpecificationAssert, A extends VecCapacitorSpecification> extends AbstractVecEEComponentSpecificationAssert {

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

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

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

    // null safe check
    VecNumericalValue actualCapacity = actual.getCapacity();
    if (!Objects.areEqual(actualCapacity, capacity)) {
      failWithMessage(assertjErrorMessage, actual, capacity, actualCapacity);
    }

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

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

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

    // null safe check
    VecNumericalValue actualImpedance = actual.getImpedance();
    if (!Objects.areEqual(actualImpedance, impedance)) {
      failWithMessage(assertjErrorMessage, actual, impedance, actualImpedance);
    }

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

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

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

    // null safe check
    VecNumericalValue actualUMax = actual.getUMax();
    if (!Objects.areEqual(actualUMax, uMax)) {
      failWithMessage(assertjErrorMessage, actual, uMax, actualUMax);
    }

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

}