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

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

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

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

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

    // null safe check
    String actualSpecificRoleType = actual.getSpecificRoleType();
    if (!Objects.areEqual(actualSpecificRoleType, specificRoleType)) {
      failWithMessage(assertjErrorMessage, actual, specificRoleType, actualSpecificRoleType);
    }

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

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

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

    // null safe check
    VecPartOrUsageRelatedSpecification actualSpecification = actual.getSpecification();
    if (!Objects.areEqual(actualSpecification, specification)) {
      failWithMessage(assertjErrorMessage, actual, specification, actualSpecification);
    }

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

}