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

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

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

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

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

    // null safe check
    VecTopologyNode actualInnerNode = actual.getInnerNode();
    if (!Objects.areEqual(actualInnerNode, innerNode)) {
      failWithMessage(assertjErrorMessage, actual, innerNode, actualInnerNode);
    }

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

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

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

    // null safe check
    VecLocation actualMappedPosition = actual.getMappedPosition();
    if (!Objects.areEqual(actualMappedPosition, mappedPosition)) {
      failWithMessage(assertjErrorMessage, actual, mappedPosition, actualMappedPosition);
    }

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

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

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

    // null safe check
    VecTopologyMappingSpecification actualParentTopologyMappingSpecification = actual.getParentTopologyMappingSpecification();
    if (!Objects.areEqual(actualParentTopologyMappingSpecification, parentTopologyMappingSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentTopologyMappingSpecification, actualParentTopologyMappingSpecification);
    }

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

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

}