Package org.springframework.test.json
Class AbstractJsonValueAssert<SELF extends AbstractJsonValueAssert<SELF>>
java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
 
org.assertj.core.api.AbstractObjectAssert<SELF,Object>
 
org.springframework.test.json.AbstractJsonValueAssert<SELF>
- Type Parameters:
- SELF- the type of assertions
- All Implemented Interfaces:
- org.assertj.core.api.Assert<SELF,,- Object> - org.assertj.core.api.Descriptable<SELF>,- org.assertj.core.api.ExtensionPoints<SELF,- Object> 
- Direct Known Subclasses:
- JsonPathValueAssert
public abstract class AbstractJsonValueAssert<SELF extends AbstractJsonValueAssert<SELF>>
extends org.assertj.core.api.AbstractObjectAssert<SELF,Object> 
Base AssertJ assertions that can be
 applied to a JSON value.
 
In JSON, values must be one of the following data types:
This base class offers direct access for each of those types as well as conversion methods based on an optionalGenericHttpMessageConverter.- Since:
- 6.2
- Author:
- Stephane Nicoll
- 
Field SummaryFields inherited from class org.assertj.core.api.AbstractAssertactual, info, myself, objects, throwUnsupportedExceptionOnEquals
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractJsonValueAssert(Object actual, Class<?> selfType, GenericHttpMessageConverter<Object> httpMessageConverter) 
- 
Method SummaryModifier and TypeMethodDescriptionorg.assertj.core.api.ObjectArrayAssert<Object>asArray()Verify that the actual value is a non-nullarray, and return a new assertion object that provides dedicated array assertions for it.org.assertj.core.api.AbstractBooleanAssert<?>Verify that the actual value is a non-nullBoolean, and return a new assertion object that provides dedicatedBooleanassertions for it.asMap()Verify that the actual value is a non-nullJSON object, and return a new assertion object that provides dedicated assertions on individual elements of the object.org.assertj.core.api.AbstractObjectAssert<?,Number> asNumber()org.assertj.core.api.AbstractStringAssert<?>asString()Verify that the actual value is a non-nullString, and return a new assertion object that provides dedicatedStringassertions for it.<T> org.assertj.core.api.AbstractObjectAssert<?,T> Verify that the actual value can be converted to an instance of the giventarget, and produce a new assertion object narrowed to that type.<T> org.assertj.core.api.AbstractObjectAssert<?,T> convertTo(ParameterizedTypeReference<T> target) Verify that the actual value can be converted to an instance of the giventarget, and produce a new assertion object narrowed to that type.protected StringisEmpty()Verify that the actual value is empty: either anullscalar value or an empty list or map.Verify that the actual value is not empty: either a non-nullscalar value or a non-empty list or map.Methods inherited from class org.assertj.core.api.AbstractObjectAssertas, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparisonMethods inherited from class org.assertj.core.api.AbstractAssertareEqual, asInstanceOf, asList, assertionError, 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, isEqualTo, 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, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptableas, describedAs, describedAs
- 
Constructor Details- 
AbstractJsonValueAssert
 
- 
- 
Method Details- 
asStringpublic org.assertj.core.api.AbstractStringAssert<?> asString()Verify that the actual value is a non-nullString, and return a new assertion object that provides dedicatedStringassertions for it.- Specified by:
- asStringin interface- org.assertj.core.api.Assert<SELF extends AbstractJsonValueAssert<SELF>,- Object> 
- Overrides:
- asStringin class- org.assertj.core.api.AbstractAssert<SELF extends AbstractJsonValueAssert<SELF>,- Object> 
 
- 
asNumber
- 
asBooleanpublic org.assertj.core.api.AbstractBooleanAssert<?> asBoolean()Verify that the actual value is a non-nullBoolean, and return a new assertion object that provides dedicatedBooleanassertions for it.
- 
asArrayVerify that the actual value is a non-nullarray, and return a new assertion object that provides dedicated array assertions for it.
- 
asMapVerify that the actual value is a non-nullJSON object, and return a new assertion object that provides dedicated assertions on individual elements of the object.The returned map assertion object uses attribute names as the keys, and the values can be any of the valid JSON values. 
- 
convertToVerify that the actual value can be converted to an instance of the giventarget, and produce a new assertion object narrowed to that type.- Parameters:
- target- the type to convert the actual value to
 
- 
convertTopublic <T> org.assertj.core.api.AbstractObjectAssert<?,T> convertTo(ParameterizedTypeReference<T> target) Verify that the actual value can be converted to an instance of the giventarget, and produce a new assertion object narrowed to that type.- Parameters:
- target- the parameterized type to convert the actual value to
 
- 
isEmptyVerify that the actual value is empty: either anullscalar value or an empty list or map.Can also be used when the path uses a filter operator to validate that it did not match. 
- 
isNotEmptyVerify that the actual value is not empty: either a non-nullscalar value or a non-empty list or map.Can also be used when the path uses a filter operator to validate that it did match at least one element. 
- 
getExpectedErrorMessagePrefix
 
-