Class AbstractQuantityAssert<S extends AbstractQuantityAssert<S,​A>,​A extends javax.measure.Quantity>

  • All Implemented Interfaces:
    org.assertj.core.api.Assert<S,​A>, org.assertj.core.api.Descriptable<S>, org.assertj.core.api.ExtensionPoints<S,​A>
    Direct Known Subclasses:
    QuantityAssert

    @Generated("assertj-assertions-generator")
    public abstract class AbstractQuantityAssert<S extends AbstractQuantityAssert<S,​A>,​A extends javax.measure.Quantity>
    extends org.assertj.core.api.AbstractObjectAssert<S,​A>
    Abstract base class for Quantity specific assertions - Generated by CustomAssertionGenerator.
    • Field Summary

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      S hasUnit​(javax.measure.Unit unit)
      Verifies that the actual Quantity's unit is equal to the given one.
      S hasValue​(java.lang.Number value)
      Verifies that the actual Quantity's value is equal to the given one.
      • Methods inherited from class org.assertj.core.api.AbstractObjectAssert

        as, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison
      • Methods inherited from class org.assertj.core.api.AbstractAssert

        areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, 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, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.assertj.core.api.Descriptable

        as, describedAs, describedAs
    • Constructor Detail

      • AbstractQuantityAssert

        protected AbstractQuantityAssert​(A actual,
                                         java.lang.Class<S> selfType)
        Creates a new AbstractQuantityAssert to make assertions on actual Quantity.
        Parameters:
        actual - the Quantity we want to make assertions on.
    • Method Detail

      • hasUnit

        public S hasUnit​(javax.measure.Unit unit)
        Verifies that the actual Quantity's unit is equal to the given one.
        Parameters:
        unit - the given unit to compare the actual Quantity's unit to.
        Returns:
        this assertion object.
        Throws:
        java.lang.AssertionError - - if the actual Quantity's unit is not equal to the given one.
      • hasValue

        public S hasValue​(java.lang.Number value)
        Verifies that the actual Quantity's value is equal to the given one.
        Parameters:
        value - the given value to compare the actual Quantity's value to.
        Returns:
        this assertion object.
        Throws:
        java.lang.AssertionError - - if the actual Quantity's value is not equal to the given one.