Class AbstractJsonNodeAssert
-
- All Implemented Interfaces:
-
org.assertj.core.api.Assert,org.assertj.core.api.Descriptable,org.assertj.core.api.ExtensionPoints
public abstract class AbstractJsonNodeAssert<NODE extends JsonNode, SELF extends AbstractObjectAssert<SELF, NODE>> extends AbstractObjectAssert<SELF, NODE>
本来是想设计为所有 JsonNode 的基类,但明显遇到了困难
CJ
-
-
Field Summary
Fields Modifier and Type Field Description public final WritableAssertionInfoinfo
-
Constructor Summary
Constructors Constructor Description AbstractJsonNodeAssert(NODE actual, Class<?> selfType)
-
Method Summary
Modifier and Type Method Description final SELFprint()final SELFhasThisType(JsonNodeType expected, Boolean optional, String path)断言 path 所在的类型为输入值 final SELFhasThisType(JsonNodeType expected, Boolean optional, Object path)断言 path 所在的类型为输入值 final SELFhasThisType(JsonNodeType expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)断言 path 所在的类型为输入值 final SELFhasNumberNode(Number expected, Boolean optional, String path)final SELFhasNumberNode(Number expected, Boolean optional, Object path)final SELFhasNumberNode(Number expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)final SELFhasTextNode(String expected, Boolean optional, String path)final SELFhasTextNode(String expected, Boolean optional, Object path)final SELFhasTextNode(String expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)final SELFhasBigIntegerNode(BigInteger expected, Boolean optional, String path)final SELFhasBigIntegerNode(BigInteger expected, Boolean optional, Object path)final SELFhasBigIntegerNode(BigInteger expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)final SELFhasDecimalNode(BigDecimal expected, Boolean optional, String path)final SELFhasDecimalNode(BigDecimal expected, Boolean optional, Object path)final SELFhasDecimalNode(BigDecimal expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)final SELFhasBooleanNode(Boolean expected, Boolean optional, String path)final SELFhasBooleanNode(Boolean expected, Boolean optional, Object path)final SELFhasBooleanNode(Boolean expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)final SELFhasBinaryNode(ByteArray expected, Boolean optional, String path)final SELFhasBinaryNode(ByteArray expected, Boolean optional, Object path)final SELFhasBinaryNode(ByteArray expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)final SELFhasArrayNodeLength(Integer expected, Boolean optional, String path)final SELFhasArrayNodeLength(Integer expected, Boolean optional, Object path)final SELFhasArrayNodeLength(Integer expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)final <T extends Any> TreadData(Class<T> javaClass, String path)返回数据结果 final <T extends Any> TreadData(Class<T> javaClass, Object path)返回数据结果 final <T extends Any> TreadData(Class<T> javaClass, Function1<JsonNode, JsonNode> toNode)返回数据结果 -
Methods inherited from class org.assertj.core.api.AbstractAssert
asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, getWritableAssertionInfo, has, hasSameClassAs, hasSameHashCodeAs, hasToString, hashCode, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, satisfies, satisfies, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError -
Methods inherited from class org.assertj.core.api.AbstractObjectAssert
as, as, extracting, extracting, extracting, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, returns, usingComparatorForFields, usingComparatorForType -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
hasThisType
final SELF hasThisType(JsonNodeType expected, Boolean optional, String path)
断言 path 所在的类型为输入值
-
hasThisType
final SELF hasThisType(JsonNodeType expected, Boolean optional, Object path)
断言 path 所在的类型为输入值
- Parameters:
path- 多重 path, 比如 "children",2 表示children里的第三个
-
hasThisType
final SELF hasThisType(JsonNodeType expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
断言 path 所在的类型为输入值
- Parameters:
toNode- 从当前 node 到目标 node
-
hasNumberNode
final SELF hasNumberNode(Number expected, Boolean optional, String path)
-
hasNumberNode
final SELF hasNumberNode(Number expected, Boolean optional, Object path)
-
hasNumberNode
final SELF hasNumberNode(Number expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
-
hasTextNode
final SELF hasTextNode(String expected, Boolean optional, String path)
-
hasTextNode
final SELF hasTextNode(String expected, Boolean optional, Object path)
-
hasTextNode
final SELF hasTextNode(String expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
-
hasBigIntegerNode
final SELF hasBigIntegerNode(BigInteger expected, Boolean optional, String path)
-
hasBigIntegerNode
final SELF hasBigIntegerNode(BigInteger expected, Boolean optional, Object path)
-
hasBigIntegerNode
final SELF hasBigIntegerNode(BigInteger expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
-
hasDecimalNode
final SELF hasDecimalNode(BigDecimal expected, Boolean optional, String path)
-
hasDecimalNode
final SELF hasDecimalNode(BigDecimal expected, Boolean optional, Object path)
-
hasDecimalNode
final SELF hasDecimalNode(BigDecimal expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
-
hasBooleanNode
final SELF hasBooleanNode(Boolean expected, Boolean optional, String path)
-
hasBooleanNode
final SELF hasBooleanNode(Boolean expected, Boolean optional, Object path)
-
hasBooleanNode
final SELF hasBooleanNode(Boolean expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
-
hasBinaryNode
final SELF hasBinaryNode(ByteArray expected, Boolean optional, String path)
-
hasBinaryNode
final SELF hasBinaryNode(ByteArray expected, Boolean optional, Object path)
-
hasBinaryNode
final SELF hasBinaryNode(ByteArray expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
-
hasArrayNodeLength
final SELF hasArrayNodeLength(Integer expected, Boolean optional, String path)
-
hasArrayNodeLength
final SELF hasArrayNodeLength(Integer expected, Boolean optional, Object path)
-
hasArrayNodeLength
final SELF hasArrayNodeLength(Integer expected, Boolean optional, Function1<JsonNode, JsonNode> toNode, String fieldDescription)
-
-
-
-