public class AssertionsOnValueType extends Object
The different type of values are enumerated in ValueType
.
AssertOnValueType
Modifier and Type | Method and Description |
---|---|
static <A extends AbstractAssert> |
isBoolean(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value)
Verifies that the value is a boolean.
|
static <A extends AbstractAssert> |
isBytes(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value)
Verifies that the value is a array of bytes.
|
static <A extends AbstractAssert> |
isDate(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value)
Verifies that the value is a date.
|
static <A extends AbstractAssert> |
isDateTime(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value)
Verifies that the value is a date/time.
|
static <A extends AbstractAssert> |
isNumber(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value)
Verifies that the value is a number.
|
static <A extends AbstractAssert> |
isOfAnyTypeIn(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value,
ValueType... expected)
Verifies that the type of the value is equal to one of the types in parameters.
|
static <A extends AbstractAssert> |
isOfType(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value,
ValueType expected)
Verifies that the type of the value is equal to the type in parameter.
|
static <A extends AbstractAssert> |
isText(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value)
Verifies that the value is a text.
|
static <A extends AbstractAssert> |
isTime(A assertion,
org.assertj.core.api.WritableAssertionInfo info,
Object value)
Verifies that the value is a time.
|
public static <A extends AbstractAssert> A isOfType(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value, ValueType expected)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected type to compare to.this
assertion object.AssertionError
- If the type of the value is different to the type in parameter.public static <A extends AbstractAssert> A isOfAnyTypeIn(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value, ValueType... expected)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected types to compare to.this
assertion object.AssertionError
- If the type of the value is different to all the types in parameters.public static <A extends AbstractAssert> A isNumber(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.this
assertion object.AssertionError
- If the type of the value is not number.public static <A extends AbstractAssert> A isBoolean(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.this
assertion object.AssertionError
- If the type of the value is not boolean.public static <A extends AbstractAssert> A isDate(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.this
assertion object.AssertionError
- If the type of the value is not date.public static <A extends AbstractAssert> A isTime(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.this
assertion object.AssertionError
- If the type of the value is not time.public static <A extends AbstractAssert> A isDateTime(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.this
assertion object.AssertionError
- If the type of the value is not date/time.public static <A extends AbstractAssert> A isBytes(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.this
assertion object.AssertionError
- If the type of the value is not array of bytes.public static <A extends AbstractAssert> A isText(A assertion, org.assertj.core.api.WritableAssertionInfo info, Object value)
A
- The type of the assertion which call this method.assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.this
assertion object.AssertionError
- If the type of the value is not text.Copyright © 2015 AssertJ. All Rights Reserved.