Namespace: OpenEdge.Core.Assertion
Type: Class AssertJson
Parent Classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object


Copyright (c) 2014, 2019-2021 by Progress Software Corporation. All rights reserved.
File:AssertJson
Purpose:Assertions specific to JSON constructs
Author(s):pjudge
Created:Wed Nov 05 16:37:30 EST 2014
Purpose: Asserts that a JSON object has a specific number of properties
@throws AssertionFailedError Error thrown if the JSON object is not valid
@throws AssertionFailedError Error thrown if the property count is negative
@throws AssertionFailedError Error thrown if the number of properties is not equal to the count



Method Summary
  Options Name Purpose
  HasProperty (JsonObject, character) /** Asserts that a Json object has a particularly-named property (of any type). @param JsonObject The JSON object being checked @param character The name of the property being checked @throws AssertionFailedError Error thrown if the property does not exist */
  HasPropertyCount (JsonObject, integer) /** Asserts that a JSON object has a specific number of properties @param JsonObject The JSON object being checked @param integer The number of properties it must have @throws AssertionFailedError Error thrown if the JSON object is not valid @throws AssertionFailedError Error thrown if the property count is negative @throws AssertionFailedError Error thrown if the number of properties is not equal to the count */
  IndexIsNull (JsonArray, integer) /** Asserts that an array extent value is null @param JsonArray The JSON object being checked @param integer The index being checked @throws AssertionFailedError Error thrown if the property does not exist */
  IndexIsType (JsonArray, integer, JsonDataTypeEnum) /** Asserts that a JSON Array has a index of a particular type. @param JsonArray The JSON object being checked @param integer The index being checked @param JsonDataTypeEnum The data type being checked @throws AssertionFailedError Error thrown if the property does not exist */
  IndexNotNull (JsonArray, integer) /** Asserts that an array extent value is null @param JsonArray The JSON object being checked @param integer The index being checked @throws AssertionFailedError Error thrown if the property does not exist */
  PropertyIsNull (JsonObject, character) /** Asserts that a the value of a property is null @param JsonObject The JSON object being checked @param character The name of the property being checked @throws AssertionFailedError Error thrown if the property does not exist */
  PropertyIsType (JsonObject, character, JsonDataTypeEnum) /** Asserts that a JSON Object has a particularly-named property of a particular type. @param JsonObject The JSON object being checked @param character The name of the property being checked @param JsonDataTypeEnum The data type being checked @throws AssertionFailedError Error thrown if the property does not exist */
  PropertyNotNull (JsonObject, character) /** Asserts that a the value of a property is not null @param JsonObject The JSON object being checked @param character The name of the property being checked @throws AssertionFailedError Error thrown if the property does not exist */

Method Detail
Top

HasProperty (JsonObject, character)

Purpose: Asserts that a Json object has a particularly-named property (of any type).
@throws AssertionFailedError Error thrown if the property does not exist
Parameters:
poObject Progress.Json.ObjectModel.JsonObject
 
pcName CHARACTER
 
Top

HasPropertyCount (JsonObject, integer)

Purpose: Asserts that a JSON object has a specific number of properties
@throws AssertionFailedError Error thrown if the JSON object is not valid
@throws AssertionFailedError Error thrown if the property count is negative
@throws AssertionFailedError Error thrown if the number of properties is not equal to the count
Parameters:
pJson Progress.Json.ObjectModel.JsonObject
 
pCnt INTEGER
 
Top

IndexIsNull (JsonArray, integer)

Purpose: Asserts that an array extent value is null
@throws AssertionFailedError Error thrown if the property does not exist
Parameters:
pArray Progress.Json.ObjectModel.JsonArray
 
pIdx INTEGER
 
Top

IndexIsType (JsonArray, integer, JsonDataTypeEnum)

Purpose: Asserts that a JSON Array has a index of a particular type.
@throws AssertionFailedError Error thrown if the property does not exist
Parameters:
pArray Progress.Json.ObjectModel.JsonArray
 
pIdx INTEGER
 
pPropertyType OpenEdge.Core.JsonDataTypeEnum
 
Top

IndexNotNull (JsonArray, integer)

Purpose: Asserts that an array extent value is null
@throws AssertionFailedError Error thrown if the property does not exist
Parameters:
pArray Progress.Json.ObjectModel.JsonArray
 
pIdx INTEGER
 
Top

PropertyIsNull (JsonObject, character)

Purpose: Asserts that a the value of a property is null
@throws AssertionFailedError Error thrown if the property does not exist
Parameters:
poObject Progress.Json.ObjectModel.JsonObject
 
pcName CHARACTER
 
Top

PropertyIsType (JsonObject, character, JsonDataTypeEnum)

Purpose: Asserts that a JSON Object has a particularly-named property of a
particular type.
@throws AssertionFailedError Error thrown if the property does not exist
Parameters:
poObject Progress.Json.ObjectModel.JsonObject
 
pcName CHARACTER
 
poPropertyType OpenEdge.Core.JsonDataTypeEnum
 
Top

PropertyNotNull (JsonObject, character)

Purpose: Asserts that a the value of a property is not null
@throws AssertionFailedError Error thrown if the property does not exist
Parameters:
poObject Progress.Json.ObjectModel.JsonObject
 
pcName CHARACTER