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

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

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

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

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

    // null safe check
    VecIECPrefix actualIecPrefix = actual.getIecPrefix();
    if (!Objects.areEqual(actualIecPrefix, iecPrefix)) {
      failWithMessage(assertjErrorMessage, actual, iecPrefix, actualIecPrefix);
    }

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

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

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

    // null safe check
    VecIECUnitName actualIecUnitName = actual.getIecUnitName();
    if (!Objects.areEqual(actualIecUnitName, iecUnitName)) {
      failWithMessage(assertjErrorMessage, actual, iecUnitName, actualIecUnitName);
    }

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

}