/platform_testing/libraries/app-helpers/spectatio/spectatio-util/src/android/platform/spectatio/configs/validators/ |
D | ValidateScrollConfig.java | 61 JsonObject jsonObject = jsonElement.getAsJsonObject(); in deserialize() local 63 validateProperties(jsonObject); in deserialize() 67 JsonConfigConstants.SCROLL_ACTION, jsonObject, /*isOptional= */ false); in deserialize() 73 throwRuntimeException("Scroll Action", scrollAction, jsonObject, "Not Supported"); in deserialize() 79 validateNotNull(JsonConfigConstants.SCROLL_FORWARD, jsonObject); in deserialize() 80 validateNotNull(JsonConfigConstants.SCROLL_BACKWARD, jsonObject); in deserialize() 86 jsonObject.get(JsonConfigConstants.SCROLL_FORWARD), in deserialize() 90 jsonObject.get(JsonConfigConstants.SCROLL_BACKWARD), in deserialize() 97 jsonObject, /*isOptional*/ in deserialize() 101 JsonConfigConstants.SCROLL_MARGIN, jsonObject, /*isOptional*/ true); in deserialize() [all …]
|
D | ValidateWorkflowTask.java | 60 JsonObject jsonObject = jsonElement.getAsJsonObject(); in deserialize() local 62 validateProperties(jsonObject); in deserialize() 66 JsonConfigConstants.NAME, jsonObject, /*isOptional= */ false); in deserialize() 70 JsonConfigConstants.WORKFLOW_TYPE, jsonObject, /*isOptional= */ false); in deserialize() 75 throwRuntimeException("Workflow Task Type", type, jsonObject, "Not Supported"); in deserialize() 79 validateNotNull(JsonConfigConstants.CONFIG, jsonObject); in deserialize() 84 jsonObject.get(JsonConfigConstants.CONFIG), WorkflowTaskConfig.class); in deserialize() 97 jsonObject, in deserialize() 113 jsonObject, in deserialize() 121 throwRuntimeException("Workflow Task Type", type, jsonObject, "Not Supported"); in deserialize() [all …]
|
D | ValidateUiElement.java | 71 JsonObject jsonObject = jsonElement.getAsJsonObject(); in deserialize() local 73 validateProperties(jsonObject); in deserialize() 76 validateAndGetValue(JsonConfigConstants.TYPE, jsonObject, /*isOptional*/ false); in deserialize() 82 boolean flag = validateAndGetBoolean(JsonConfigConstants.FLAG, jsonObject, true); in deserialize() 88 validateAndGetArray(JsonConfigConstants.SPECIFIERS, jsonObject); in deserialize() 113 JsonObject parent = validateAndGetObject(JsonConfigConstants.ANCESTOR, jsonObject); in deserialize() 114 int maxDepth = validateAndGetInteger(JsonConfigConstants.MAX_DEPTH, jsonObject, 1); in deserialize() 122 JsonObject childJson = validateAndGetObject(JsonConfigConstants.DESCENDANT, jsonObject); in deserialize() 123 int maxDepth = validateAndGetInteger(JsonConfigConstants.MAX_DEPTH, jsonObject, 1); in deserialize() 131 validateAndGetValue(JsonConfigConstants.VALUE, jsonObject, /*isOptional*/ false); in deserialize() [all …]
|
D | ValidateWorkflowTaskConfig.java | 49 JsonObject jsonObject = jsonElement.getAsJsonObject(); in deserialize() local 51 validateProperties(jsonObject); in deserialize() 53 String textValue = validateAndGetTextValue(JsonConfigConstants.CONFIG_TEXT, jsonObject); in deserialize() 57 JsonConfigConstants.CONFIG_UI_ELEMENT, jsonObject, context); in deserialize() 62 String.format("Workflow Task Config %s is invalid.", jsonObject)); in deserialize() 68 private String validateAndGetTextValue(String key, JsonObject jsonObject) { in validateAndGetTextValue() argument 69 JsonElement value = jsonObject.get(key); in validateAndGetTextValue() 80 String key, JsonObject jsonObject, JsonDeserializationContext context) { in validateAndGetUiElementValue() argument 81 JsonElement value = jsonObject.get(key); in validateAndGetUiElementValue() 88 private void validateProperties(JsonObject jsonObject) { in validateProperties() argument [all …]
|
D | ValidateMapEntries.java | 41 JsonObject jsonObject = jsonElement.getAsJsonObject(); in deserialize() local 45 for (Entry<String, JsonElement> entry : jsonObject.entrySet()) { in deserialize()
|
/platform_testing/libraries/motion/src/platform/test/motion/golden/ |
D | JsonGoldenSerializer.kt | 42 fun fromJson(jsonObject: JSONObject, typeRegistry: Map<String, DataPointType<*>>): TimeSeries { in fromJson() 44 jsonObject.getJSONArray(KEY_FRAME_IDS).convert(JSONArray::get, ::frameIdFromJson) in fromJson() 47 jsonObject.getJSONArray(KEY_FEATURES).convert(JSONArray::getJSONObject) { in fromJson() 82 jsonObject: JSONObject, in featureFromJson() 85 val name = jsonObject.getString(KEY_FEATURE_NAME) in featureFromJson() 86 val type = typeRegistry[jsonObject.optString(KEY_FEATURE_TYPE)] ?: unknownType in featureFromJson() 89 jsonObject.getJSONArray(KEY_FEATURE_DATAPOINTS).convert(JSONArray::get, type::fromJson) in featureFromJson()
|
/platform_testing/libraries/motion/src/platform/test/motion/ |
D | MotionTestRule.kt | 115 val jsonObject = JSONObject(it.readText()) in <lambda>() constant 116 JsonGoldenSerializer.fromJson(jsonObject, typeRegistry) in <lambda>() 165 val jsonObject = JsonGoldenSerializer.toJson(recordedMotion.timeSeries) in <lambda>() constant 166 jsonObject.put("//metadata", metadata) in <lambda>() 167 it.write(jsonObject.toString(JSON_INDENTATION)) in <lambda>()
|