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

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

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

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

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

    // null safe check
    VecPinComponent actualAnode = actual.getAnode();
    if (!Objects.areEqual(actualAnode, anode)) {
      failWithMessage(assertjErrorMessage, actual, anode, actualAnode);
    }

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

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

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

    // null safe check
    VecNumericalValue actualBreakDownVoltage = actual.getBreakDownVoltage();
    if (!Objects.areEqual(actualBreakDownVoltage, breakDownVoltage)) {
      failWithMessage(assertjErrorMessage, actual, breakDownVoltage, actualBreakDownVoltage);
    }

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

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

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

    // null safe check
    VecPinComponent actualCathode = actual.getCathode();
    if (!Objects.areEqual(actualCathode, cathode)) {
      failWithMessage(assertjErrorMessage, actual, cathode, actualCathode);
    }

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

  /**
   * Verifies that the actual VecDiodeSpecification's iMax is equal to the given one.
   * @param iMax the given iMax to compare the actual VecDiodeSpecification's iMax to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecDiodeSpecification's iMax is not equal to the given one.
   */
  public S hasIMax(VecNumericalValue iMax) {
    // check that actual VecDiodeSpecification 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 VecDiodeSpecification's thresholdVoltage is equal to the given one.
   * @param thresholdVoltage the given thresholdVoltage to compare the actual VecDiodeSpecification's thresholdVoltage to.
   * @return this assertion object.
   * @throws AssertionError - if the actual VecDiodeSpecification's thresholdVoltage is not equal to the given one.
   */
  public S hasThresholdVoltage(VecNumericalValue thresholdVoltage) {
    // check that actual VecDiodeSpecification we want to make assertions on is not null.
    isNotNull();

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

    // null safe check
    VecNumericalValue actualThresholdVoltage = actual.getThresholdVoltage();
    if (!Objects.areEqual(actualThresholdVoltage, thresholdVoltage)) {
      failWithMessage(assertjErrorMessage, actual, thresholdVoltage, actualThresholdVoltage);
    }

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

}