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

com.foursoft.vecmodel.vec120.AbstractVecSwitchingStateAssert Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.foursoft.vecmodel.vec120;

import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;

/**
 * Abstract base class for {@link VecSwitchingState} specific assertions - Generated by CustomAssertionGenerator.
 */
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecSwitchingStateAssert, A extends VecSwitchingState> extends AbstractVecConfigurableElementAssert {

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

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

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

    // null safe check
    String actualIdentification = actual.getIdentification();
    if (!Objects.areEqual(actualIdentification, identification)) {
      failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
    }

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

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

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

    // null safe check
    VecEEComponentSpecification actualParentEEComponentSpecification = actual.getParentEEComponentSpecification();
    if (!Objects.areEqual(actualParentEEComponentSpecification, parentEEComponentSpecification)) {
      failWithMessage(assertjErrorMessage, actual, parentEEComponentSpecification, actualParentEEComponentSpecification);
    }

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

  /**
   * Verifies that the actual VecSwitchingState's switchedConnections contains the given VecInternalComponentConnection elements.
   * @param switchedConnections the given elements that should be contained in actual VecSwitchingState's switchedConnections.
   * @return this assertion object.
   * @throws AssertionError if the actual VecSwitchingState's switchedConnections does not contain all given VecInternalComponentConnection elements.
   */
  public S hasSwitchedConnections(VecInternalComponentConnection... switchedConnections) {
    // check that actual VecSwitchingState we want to make assertions on is not null.
    isNotNull();

    // check that given VecInternalComponentConnection varargs is not null.
    if (switchedConnections == null) failWithMessage("Expecting switchedConnections parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getSwitchedConnections(), switchedConnections);

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

  /**
   * Verifies that the actual VecSwitchingState's switchedConnections contains the given VecInternalComponentConnection elements in Collection.
   * @param switchedConnections the given elements that should be contained in actual VecSwitchingState's switchedConnections.
   * @return this assertion object.
   * @throws AssertionError if the actual VecSwitchingState's switchedConnections does not contain all given VecInternalComponentConnection elements.
   */
  public S hasSwitchedConnections(java.util.Collection switchedConnections) {
    // check that actual VecSwitchingState we want to make assertions on is not null.
    isNotNull();

    // check that given VecInternalComponentConnection collection is not null.
    if (switchedConnections == null) {
      failWithMessage("Expecting switchedConnections parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContains(info, actual.getSwitchedConnections(), switchedConnections.toArray());

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

  /**
   * Verifies that the actual VecSwitchingState's switchedConnections contains only the given VecInternalComponentConnection elements and nothing else in whatever order.
   * @param switchedConnections the given elements that should be contained in actual VecSwitchingState's switchedConnections.
   * @return this assertion object.
   * @throws AssertionError if the actual VecSwitchingState's switchedConnections does not contain all given VecInternalComponentConnection elements.
   */
  public S hasOnlySwitchedConnections(VecInternalComponentConnection... switchedConnections) {
    // check that actual VecSwitchingState we want to make assertions on is not null.
    isNotNull();

    // check that given VecInternalComponentConnection varargs is not null.
    if (switchedConnections == null) failWithMessage("Expecting switchedConnections parameter not to be null.");

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getSwitchedConnections(), switchedConnections);

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

  /**
   * Verifies that the actual VecSwitchingState's switchedConnections contains only the given VecInternalComponentConnection elements in Collection and nothing else in whatever order.
   * @param switchedConnections the given elements that should be contained in actual VecSwitchingState's switchedConnections.
   * @return this assertion object.
   * @throws AssertionError if the actual VecSwitchingState's switchedConnections does not contain all given VecInternalComponentConnection elements.
   */
  public S hasOnlySwitchedConnections(java.util.Collection switchedConnections) {
    // check that actual VecSwitchingState we want to make assertions on is not null.
    isNotNull();

    // check that given VecInternalComponentConnection collection is not null.
    if (switchedConnections == null) {
      failWithMessage("Expecting switchedConnections parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
    Iterables.instance().assertContainsOnly(info, actual.getSwitchedConnections(), switchedConnections.toArray());

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

  /**
   * Verifies that the actual VecSwitchingState's switchedConnections does not contain the given VecInternalComponentConnection elements.
   *
   * @param switchedConnections the given elements that should not be in actual VecSwitchingState's switchedConnections.
   * @return this assertion object.
   * @throws AssertionError if the actual VecSwitchingState's switchedConnections contains any given VecInternalComponentConnection elements.
   */
  public S doesNotHaveSwitchedConnections(VecInternalComponentConnection... switchedConnections) {
    // check that actual VecSwitchingState we want to make assertions on is not null.
    isNotNull();

    // check that given VecInternalComponentConnection varargs is not null.
    if (switchedConnections == null) failWithMessage("Expecting switchedConnections parameter not to be null.");

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getSwitchedConnections(), switchedConnections);

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

  /**
   * Verifies that the actual VecSwitchingState's switchedConnections does not contain the given VecInternalComponentConnection elements in Collection.
   *
   * @param switchedConnections the given elements that should not be in actual VecSwitchingState's switchedConnections.
   * @return this assertion object.
   * @throws AssertionError if the actual VecSwitchingState's switchedConnections contains any given VecInternalComponentConnection elements.
   */
  public S doesNotHaveSwitchedConnections(java.util.Collection switchedConnections) {
    // check that actual VecSwitchingState we want to make assertions on is not null.
    isNotNull();

    // check that given VecInternalComponentConnection collection is not null.
    if (switchedConnections == null) {
      failWithMessage("Expecting switchedConnections parameter not to be null.");
      return myself; // to fool Eclipse "Null pointer access" warning on toArray.
    }

    // check with standard error message (use overridingErrorMessage before contains to set your own message).
    Iterables.instance().assertDoesNotContain(info, actual.getSwitchedConnections(), switchedConnections.toArray());

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

  /**
   * Verifies that the actual VecSwitchingState has no switchedConnections.
   * @return this assertion object.
   * @throws AssertionError if the actual VecSwitchingState's switchedConnections is not empty.
   */
  public S hasNoSwitchedConnections() {
    // check that actual VecSwitchingState we want to make assertions on is not null.
    isNotNull();

    // we override the default error message with a more explicit one
    String assertjErrorMessage = "\nExpecting :\n  <%s>\nnot to have switchedConnections but had :\n  <%s>";

    // check
    if (actual.getSwitchedConnections().iterator().hasNext()) {
      failWithMessage(assertjErrorMessage, actual, actual.getSwitchedConnections());
    }

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


}