Class AssertionsOnValueType
java.lang.Object
org.assertj.db.api.assertions.impl.AssertionsOnValueType
Implements the assertion methods on the type of a value.
The different type of values are enumerated in ValueType.
- Author:
- Régis Pouiller, Otoniel Isidoro
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends AbstractAssert<?>>
AVerifies that the value is a boolean.static <A extends AbstractAssert<?>>
AVerifies that the value is a array of bytes.static <A extends AbstractAssert<?>>
AVerifies that the value is a date.static <A extends AbstractAssert<?>>
AisDateTime(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a date/time.static <A extends AbstractAssert<?>>
AVerifies that the value is a number.static <A extends AbstractAssert<?>>
AisOfAnyTypeIn(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, ValueType... expected) Verifies that the type of the value is equal to one of the types in parameters.static <A extends AbstractAssert<?>>
AisOfType(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, ValueType expected) Verifies that the type of the value is equal to the type in parameter.static <A extends AbstractAssert<?>>
AVerifies that the value is a text.static <A extends AbstractAssert<?>>
AVerifies that the value is a time.static <A extends AbstractAssert<?>>
AVerifies that the value is an UUID.
-
Method Details
-
isOfType
public static <A extends AbstractAssert<?>> A isOfType(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, ValueType expected) Verifies that the type of the value is equal to the type in parameter.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.expected- The expected type to compare to.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is different to the type in parameter.
-
isOfAnyTypeIn
public static <A extends AbstractAssert<?>> A isOfAnyTypeIn(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, ValueType... expected) Verifies that the type of the value is equal to one of the types in parameters.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.expected- The expected types to compare to.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is different to all the types in parameters.
-
isNumber
public static <A extends AbstractAssert<?>> A isNumber(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a number.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not number.
-
isBoolean
public static <A extends AbstractAssert<?>> A isBoolean(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a boolean.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not boolean.
-
isDate
public static <A extends AbstractAssert<?>> A isDate(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a date.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not date.
-
isTime
public static <A extends AbstractAssert<?>> A isTime(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a time.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not time.
-
isDateTime
public static <A extends AbstractAssert<?>> A isDateTime(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a date/time.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not date/time.
-
isBytes
public static <A extends AbstractAssert<?>> A isBytes(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a array of bytes.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not array of bytes.
-
isText
public static <A extends AbstractAssert<?>> A isText(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is a text.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not text.
-
isUUID
public static <A extends AbstractAssert<?>> A isUUID(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value) Verifies that the value is an UUID.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.value- The value.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the value is not UUID.- Since:
- 1.1.0
-