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

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

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

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

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

    // null safe check
    VecFixingSpecification actualFixingSpecification = actual.getFixingSpecification();
    if (!Objects.areEqual(actualFixingSpecification, fixingSpecification)) {
      failWithMessage(assertjErrorMessage, actual, fixingSpecification, actualFixingSpecification);
    }

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

}