Class AccumulatorAssert<E,A>

java.lang.Object
org.assertj.core.api.AbstractAssert<AccumulatorAssert<E,A>, Accumulator<E,A>>
dmx.fun.assertj.AccumulatorAssert<E,A>
Type Parameters:
E - the accumulated side-channel type
A - the primary value type
All Implemented Interfaces:
org.assertj.core.api.Assert<AccumulatorAssert<E,A>, Accumulator<E,A>>, org.assertj.core.api.Descriptable<AccumulatorAssert<E,A>>, org.assertj.core.api.ExtensionPoints<AccumulatorAssert<E,A>, Accumulator<E,A>>

@NullMarked public final class AccumulatorAssert<E,A> extends org.assertj.core.api.AbstractAssert<AccumulatorAssert<E,A>, Accumulator<E,A>>
AssertJ assertions for Accumulator.

Obtain instances via DmxFunAssertions.assertThat(Accumulator).

  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Method Summary

    Modifier and Type
    Method
    Description
    Verifies that the accumulator's side-channel (which must be a Collection) contains the given element.
    accumulationHasSize(int expected)
    Verifies that the accumulator's side-channel (which must be a Collection) has the given size.
    hasAccumulation(E expected)
    Verifies that the accumulator's side-channel equals the given expected accumulation.
    hasValue(@Nullable A expected)
    Verifies that the accumulator's primary value equals the given expected value.

    Methods inherited from class org.assertj.core.api.AbstractAssert

    actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs, describedAs
  • Method Details

    • hasValue

      public AccumulatorAssert<E,A> hasValue(@Nullable A expected)
      Verifies that the accumulator's primary value equals the given expected value.
      Parameters:
      expected - the expected value (may be null)
      Returns:
      this assertion for chaining
    • hasAccumulation

      public AccumulatorAssert<E,A> hasAccumulation(E expected)
      Verifies that the accumulator's side-channel equals the given expected accumulation.
      Parameters:
      expected - the expected accumulated value
      Returns:
      this assertion for chaining
    • accumulationContains

      public AccumulatorAssert<E,A> accumulationContains(Object element)
      Verifies that the accumulator's side-channel (which must be a Collection) contains the given element.
      Parameters:
      element - the element expected to be present in the accumulation
      Returns:
      this assertion for chaining
      Throws:
      AssertionError - if the accumulated value is not a Collection
    • accumulationHasSize

      public AccumulatorAssert<E,A> accumulationHasSize(int expected)
      Verifies that the accumulator's side-channel (which must be a Collection) has the given size.
      Parameters:
      expected - the expected number of elements in the accumulation
      Returns:
      this assertion for chaining
      Throws:
      AssertionError - if the accumulated value is not a Collection