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

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

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

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

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

    // null safe check
    String actualTerminalType = actual.getTerminalType();
    if (!Objects.areEqual(actualTerminalType, terminalType)) {
      failWithMessage(assertjErrorMessage, actual, terminalType, actualTerminalType);
    }

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

}