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

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

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

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

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

    // null safe check
    VecComplexProperty actualParentComplexProperty = actual.getParentComplexProperty();
    if (!Objects.areEqual(actualParentComplexProperty, parentComplexProperty)) {
      failWithMessage(assertjErrorMessage, actual, parentComplexProperty, actualParentComplexProperty);
    }

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

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

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

    // null safe check
    VecExtendableElement actualParentExtendableElement = actual.getParentExtendableElement();
    if (!Objects.areEqual(actualParentExtendableElement, parentExtendableElement)) {
      failWithMessage(assertjErrorMessage, actual, parentExtendableElement, actualParentExtendableElement);
    }

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

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

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

    // null safe check
    String actualPropertyType = actual.getPropertyType();
    if (!Objects.areEqual(actualPropertyType, propertyType)) {
      failWithMessage(assertjErrorMessage, actual, propertyType, actualPropertyType);
    }

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

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

}