Package tech.uom.lib.assertj
Class JUnitSoftAssertions
- java.lang.Object
-
- org.assertj.core.api.DefaultAssertionErrorCollector
-
- org.assertj.core.api.AbstractSoftAssertions
-
- org.assertj.core.api.JUnitSoftAssertions
-
- tech.uom.lib.assertj.JUnitSoftAssertions
-
- All Implemented Interfaces:
org.assertj.core.api.AfterAssertionErrorCollected
,org.assertj.core.api.AssertionErrorCollector
,org.assertj.core.api.InstanceOfAssertFactories
,org.assertj.core.api.Java6StandardSoftAssertionsProvider
,org.assertj.core.api.SoftAssertionsProvider
,org.assertj.core.api.SoftAssertionsRule
,org.assertj.core.api.StandardSoftAssertionsProvider
,org.junit.rules.TestRule
@Generated("assertj-assertions-generator") public class JUnitSoftAssertions extends org.assertj.core.api.JUnitSoftAssertions
LikeSoftAssertions
but as a junit rule that takes care of callingassertAll()
at the end of each test.Example:
public class SoftlyTest { @Rule public final JUnitBDDSoftAssertions softly = new JUnitBDDSoftAssertions(); @Test public void soft_bdd_assertions() throws Exception { softly.assertThat(1).isEqualTo(2); softly.assertThat(Lists.newArrayList(1, 2)).containsOnly(1, 2); // no need to call assertAll(), this is done automatically. } }
-
-
Field Summary
-
Fields inherited from interface org.assertj.core.api.InstanceOfAssertFactories
ARRAY, ARRAY_2D, ATOMIC_BOOLEAN, ATOMIC_INTEGER, ATOMIC_INTEGER_ARRAY, ATOMIC_INTEGER_FIELD_UPDATER, ATOMIC_LONG, ATOMIC_LONG_ARRAY, ATOMIC_LONG_FIELD_UPDATER, ATOMIC_MARKABLE_REFERENCE, ATOMIC_REFERENCE, ATOMIC_REFERENCE_ARRAY, ATOMIC_REFERENCE_FIELD_UPDATER, ATOMIC_STAMPED_REFERENCE, BIG_DECIMAL, BIG_INTEGER, BOOLEAN, BOOLEAN_2D_ARRAY, BOOLEAN_ARRAY, BYTE, BYTE_2D_ARRAY, BYTE_ARRAY, CHAR_2D_ARRAY, CHAR_ARRAY, CHAR_SEQUENCE, CHARACTER, CLASS, COLLECTION, COMPLETABLE_FUTURE, COMPLETION_STAGE, DATE, DOUBLE, DOUBLE_2D_ARRAY, DOUBLE_ARRAY, DOUBLE_PREDICATE, DOUBLE_STREAM, DURATION, FILE, FLOAT, FLOAT_2D_ARRAY, FLOAT_ARRAY, FUTURE, INPUT_STREAM, INSTANT, INT_2D_ARRAY, INT_ARRAY, INT_PREDICATE, INT_STREAM, INTEGER, ITERABLE, ITERATOR, LIST, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, LONG, LONG_2D_ARRAY, LONG_ADDER, LONG_ARRAY, LONG_PREDICATE, LONG_STREAM, MAP, MATCHER, OFFSET_DATE_TIME, OFFSET_TIME, OPTIONAL, OPTIONAL_DOUBLE, OPTIONAL_INT, OPTIONAL_LONG, PATH, PERIOD, PREDICATE, SHORT, SHORT_2D_ARRAY, SHORT_ARRAY, SPLITERATOR, STREAM, STRING, STRING_BUFFER, STRING_BUILDER, THROWABLE, URI_TYPE, URL_TYPE, ZONED_DATE_TIME
-
-
Constructor Summary
Constructors Constructor Description JUnitSoftAssertions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DimensionAssert
assertThat(javax.measure.Dimension actual)
Creates a new "soft" instance of
.DimensionAssert
QuantityAssert
assertThat(javax.measure.Quantity actual)
Creates a new "soft" instance of
.QuantityAssert
UnitAssert
assertThat(javax.measure.Unit actual)
Creates a new "soft" instance of
.UnitAssert
-
Methods inherited from class org.assertj.core.api.AbstractSoftAssertions
assertAll, assertAll, errorsCollected, fail, fail, fail, failBecauseExceptionWasNotThrown, proxy, shouldHaveThrown
-
Methods inherited from class org.assertj.core.api.DefaultAssertionErrorCollector
assertionErrorsCollected, collectAssertionError, decorateErrorsCollected, getDelegate, setAfterAssertionErrorCollected, setDelegate, succeeded, wasSuccess
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.assertj.core.api.AssertionErrorCollector
assertionErrorsCollected, collectAssertionError, getDelegate, onAssertionErrorCollected, setDelegate, succeeded, wasSuccess
-
Methods inherited from interface org.assertj.core.api.Java6StandardSoftAssertionsProvider
assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThatCharSequence, assertThatCode, assertThatCollection, assertThatComparable, assertThatException, assertThatExceptionOfType, assertThatIllegalArgumentException, assertThatIllegalStateException, assertThatIndexOutOfBoundsException, assertThatIOException, assertThatIterable, assertThatIterator, assertThatList, assertThatNullPointerException, assertThatObject, assertThatReflectiveOperationException, assertThatRuntimeException, assertThatThrownBy, assertThatThrownBy
-
Methods inherited from interface org.assertj.core.api.SoftAssertionsProvider
assertAll, assertAlso, check, proxy
-
Methods inherited from interface org.assertj.core.api.StandardSoftAssertionsProvider
assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThatPath, assertThatPredicate, assertThatStream
-
-
-
-
Method Detail
-
assertThat
public DimensionAssert assertThat(javax.measure.Dimension actual)
Creates a new "soft" instance of
.DimensionAssert
- Parameters:
actual
- the actual value.- Returns:
- the created "soft" assertion object.
-
assertThat
public QuantityAssert assertThat(javax.measure.Quantity actual)
Creates a new "soft" instance of
.QuantityAssert
- Parameters:
actual
- the actual value.- Returns:
- the created "soft" assertion object.
-
assertThat
public UnitAssert assertThat(javax.measure.Unit actual)
Creates a new "soft" instance of
.UnitAssert
- Parameters:
actual
- the actual value.- Returns:
- the created "soft" assertion object.
-
-