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

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

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

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

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

    // null safe check
    VecFerriteSpecification actualFerriteSpecification = actual.getFerriteSpecification();
    if (!Objects.areEqual(actualFerriteSpecification, ferriteSpecification)) {
      failWithMessage(assertjErrorMessage, actual, ferriteSpecification, actualFerriteSpecification);
    }

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

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

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

    // null safe check
    java.math.BigInteger actualNumberOfWindings = actual.getNumberOfWindings();
    if (!Objects.areEqual(actualNumberOfWindings, numberOfWindings)) {
      failWithMessage(assertjErrorMessage, actual, numberOfWindings, actualNumberOfWindings);
    }

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

}