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

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

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

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

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

    // null safe check
    VecCableTieSpecification actualCableTieSpecification = actual.getCableTieSpecification();
    if (!Objects.areEqual(actualCableTieSpecification, cableTieSpecification)) {
      failWithMessage(assertjErrorMessage, actual, cableTieSpecification, actualCableTieSpecification);
    }

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

}