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

com.foursoft.vecmodel.vec120.AbstractVecMassInformationAssert 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.util.Objects;

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

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

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

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

    // null safe check
    VecValueDetermination actualDeterminationType = actual.getDeterminationType();
    if (!Objects.areEqual(actualDeterminationType, determinationType)) {
      failWithMessage(assertjErrorMessage, actual, determinationType, actualDeterminationType);
    }

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

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

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

    // null safe check
    VecNumericalValue actualValue = actual.getValue();
    if (!Objects.areEqual(actualValue, value)) {
      failWithMessage(assertjErrorMessage, actual, value, actualValue);
    }

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

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

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

    // null safe check
    String actualValueSource = actual.getValueSource();
    if (!Objects.areEqual(actualValueSource, valueSource)) {
      failWithMessage(assertjErrorMessage, actual, valueSource, actualValueSource);
    }

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

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

}