Class AssertionFailedErrorBuilder.PrefixedValues
- java.lang.Object
-
- com.github.robtimus.junit.support.AssertionFailedErrorBuilder.PrefixedValues
-
- Enclosing class:
- AssertionFailedErrorBuilder
public static final class AssertionFailedErrorBuilder.PrefixedValues extends Object
An object that can set the possible expected value or actual value of an assertion with a prefix.- Author:
- Rob Spoor
- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssertionFailedErrorBuilderactual(Object actual)Sets the actual value of the assertion.AssertionFailedErrorBuilderactualValues(Object... actual)Sets the multiple actual values of the assertion.AssertionFailedErrorBuilderactualValues(Collection<?> actual)Sets the multiple actual values of the assertion.AssertionFailedErrorBuilderexpected(Object expected)Sets the expected value of the assertion.AssertionFailedErrorBuilderexpectedOneOf(Object... expected)Sets the possible expected values of the assertion.AssertionFailedErrorBuilderexpectedOneOf(Collection<?> expected)Sets the possible expected values of the assertion.
-
-
-
Method Detail
-
expected
public AssertionFailedErrorBuilder expected(Object expected)
Sets the expected value of the assertion.- Parameters:
expected- The expected value.- Returns:
- The
AssertionFailedErrorBuilderthat returned this object.
-
expectedOneOf
public AssertionFailedErrorBuilder expectedOneOf(Object... expected)
Sets the possible expected values of the assertion.Note that the
expected valueof the assertion will be a list containing the expected values.- Parameters:
expected- The expected values.- Returns:
- The
AssertionFailedErrorBuilderthat returned this object.
-
expectedOneOf
public AssertionFailedErrorBuilder expectedOneOf(Collection<?> expected)
Sets the possible expected values of the assertion.Note that the
expected valueof the assertion will be a list containing the expected values.- Parameters:
expected- The expected values.- Returns:
- The
AssertionFailedErrorBuilderthat returned this object. - Throws:
NullPointerException- If the given collection isnull.
-
actual
public AssertionFailedErrorBuilder actual(Object actual)
Sets the actual value of the assertion.- Parameters:
actual- The actual value.- Returns:
- The
AssertionFailedErrorBuilderthat returned this object.
-
actualValues
public AssertionFailedErrorBuilder actualValues(Object... actual)
Sets the multiple actual values of the assertion.Note that the
actual valueof the assertion will be a list containing the actual values.- Parameters:
actual- The actual values.- Returns:
- The
AssertionFailedErrorBuilderthat returned this object.
-
actualValues
public AssertionFailedErrorBuilder actualValues(Collection<?> actual)
Sets the multiple actual values of the assertion.Note that the
actual valueof the assertion will be a list containing the actual values.- Parameters:
actual- The actual values.- Returns:
- The
AssertionFailedErrorBuilderthat returned this object. - Throws:
NullPointerException- If the given collection isnull.
-
-