Package tech.uom.lib.assertj
Class JUnitSoftAssertions
java.lang.Object
org.assertj.core.api.AbstractSoftAssertions
org.assertj.core.api.Java6AbstractStandardSoftAssertions
org.assertj.core.api.AbstractStandardSoftAssertions
org.assertj.core.api.JUnitSoftAssertions
tech.uom.lib.assertj.JUnitSoftAssertions
- All Implemented Interfaces:
org.junit.rules.TestRule
@Generated("assertj-assertions-generator")
public class JUnitSoftAssertions
extends org.assertj.core.api.JUnitSoftAssertions
Like
SoftAssertions
but as a junit rule that takes care of calling
assertAll()
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 class org.assertj.core.api.AbstractSoftAssertions
proxies
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassertThat
(javax.measure.Dimension actual) Creates a new "soft" instance of
.DimensionAssert
assertThat
(javax.measure.Quantity actual) Creates a new "soft" instance of
.QuantityAssert
assertThat
(javax.measure.Unit actual) Creates a new "soft" instance of
.UnitAssert
Methods inherited from class org.assertj.core.api.JUnitSoftAssertions
apply
Methods inherited from class org.assertj.core.api.AbstractStandardSoftAssertions
assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat
Methods inherited from class org.assertj.core.api.Java6AbstractStandardSoftAssertions
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, assertThatCode, assertThatThrownBy
Methods inherited from class org.assertj.core.api.AbstractSoftAssertions
errorsCollected, fail, fail, fail, failBecauseExceptionWasNotThrown, proxy, shouldHaveThrown, wasSuccess
-
Constructor Details
-
JUnitSoftAssertions
public JUnitSoftAssertions()
-
-
Method Details
-
assertThat
Creates a new "soft" instance of
.DimensionAssert
- Parameters:
actual
- the actual value.- Returns:
- the created "soft" assertion object.
-
assertThat
Creates a new "soft" instance of
.QuantityAssert
- Parameters:
actual
- the actual value.- Returns:
- the created "soft" assertion object.
-
assertThat
Creates a new "soft" instance of
.UnitAssert
- Parameters:
actual
- the actual value.- Returns:
- the created "soft" assertion object.
-