Class JsonAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<JsonAssert,String>
ubic.gemma.rest.util.JsonAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<JsonAssert,String>, org.assertj.core.api.Descriptable<JsonAssert>, org.assertj.core.api.ExtensionPoints<JsonAssert,String>

public class JsonAssert extends org.assertj.core.api.AbstractAssert<JsonAssert,String>
Assertions for JSON based on JsonPath.
Author:
poirigui
  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, throwUnsupportedExceptionOnEquals
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Ensure that a given path does not exist.
    hasPath(String jsonPath)
    Ensure that a given path exists.
    hasPathWithValue(String jsonPath, Object value)
    Ensure that a JSON path has the given value.
    static org.assertj.core.api.InstanceOfAssertFactory<String,JsonAssert>
     

    Methods inherited from class org.assertj.core.api.AbstractAssert

    actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, 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, usingEquals, usingEquals, 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

    • JsonAssert

      public JsonAssert(String json)
  • Method Details

    • json

      public static org.assertj.core.api.InstanceOfAssertFactory<String,JsonAssert> json()
    • hasPath

      public JsonAssert hasPath(String jsonPath)
      Ensure that a given path exists.
    • doesNotHavePath

      public JsonAssert doesNotHavePath(String jsonPath)
      Ensure that a given path does not exist.
    • hasPathWithValue

      public <T> JsonAssert hasPathWithValue(String jsonPath, Object value)
      Ensure that a JSON path has the given value.