Package com.devsoap.json
Class JsonValueAssert<VALUE_TYPE>
java.lang.Object
org.assertj.core.api.AbstractAssert<JsonValueAssert<VALUE_TYPE>,VALUE_TYPE>
com.devsoap.json.JsonValueAssert<VALUE_TYPE>
- All Implemented Interfaces:
org.assertj.core.api.Assert<JsonValueAssert<VALUE_TYPE>,
,VALUE_TYPE> org.assertj.core.api.Descriptable<JsonValueAssert<VALUE_TYPE>>
,org.assertj.core.api.ExtensionPoints<JsonValueAssert<VALUE_TYPE>,
VALUE_TYPE>
public class JsonValueAssert<VALUE_TYPE>
extends org.assertj.core.api.AbstractAssert<JsonValueAssert<VALUE_TYPE>,VALUE_TYPE>
JSON Array Assertions
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JsonValueAssert
(String fieldName, jakarta.json.JsonValue value, VALUE_TYPE fieldValue) -
Method Summary
Modifier and TypeMethodDescriptionGet field as array<ITEM> org.assertj.core.api.ListAssert
<ITEM> Get field as typed arrayasArray()
Cast value to Arrayorg.assertj.core.api.BigDecimalAssert
Cast value toBigDecimal
org.assertj.core.api.BigIntegerAssert
Cast value toBigInteger
org.assertj.core.api.DoubleAssert
asDouble()
Cast value toDouble
org.assertj.core.api.IntegerAssert
Cast value toInteger
org.assertj.core.api.AbstractLongAssert
<?> asLong()
Cast value toLong
Get a field or property by namefield
(String fieldName, Class<VALUE_TYPE> type) Get typed fieldAssert value matches regular expressionnotMatches
(String regex) Assert value does not match regular expressionGet field by pathMethods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
JsonValueAssert
-
-
Method Details
-
field
Get a field or property by name- Parameters:
fieldName
- the field name- Returns:
- the json value assert
-
field
Get typed field- Parameters:
fieldName
- the field nametype
- the type- Returns:
- the json value assert
-
array
Get field as array- Parameters:
fieldName
- the field name- Returns:
- the json array assert
-
array
Get field as typed array- Type Parameters:
ITEM
- the type parameter- Parameters:
fieldName
- the field nameitemClass
- the item class- Returns:
- the list assert
-
path
Get field by path- Parameters:
fields
- the fields- Returns:
- the json value assert
-
asInteger
public org.assertj.core.api.IntegerAssert asInteger()Cast value toInteger
- Returns:
- the integer assert
-
asBigDecimal
public org.assertj.core.api.BigDecimalAssert asBigDecimal()Cast value toBigDecimal
- Returns:
- the big decimal assert
-
asBigInteger
public org.assertj.core.api.BigIntegerAssert asBigInteger()Cast value toBigInteger
- Returns:
- the big integer assert
-
asDouble
public org.assertj.core.api.DoubleAssert asDouble()Cast value toDouble
- Returns:
- the double assert
-
asLong
public org.assertj.core.api.AbstractLongAssert<?> asLong()Cast value toLong
- Returns:
- the abstract long assert
-
asArray
Cast value to Array- Returns:
- the json array assert
-
matches
Assert value matches regular expression- Parameters:
regex
- the regex- Returns:
- the json value assert
-
notMatches
Assert value does not match regular expression- Parameters:
regex
- the regex- Returns:
- the json value assert
-
isEqualTo
- Specified by:
isEqualTo
in interfaceorg.assertj.core.api.Assert<JsonValueAssert<VALUE_TYPE>,
VALUE_TYPE> - Overrides:
isEqualTo
in classorg.assertj.core.api.AbstractAssert<JsonValueAssert<VALUE_TYPE>,
VALUE_TYPE>
-