ee.jakarta.tck.jsonp.api.jsonarraytests.ArrayBuilders Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package ee.jakarta.tck.jsonp.api.jsonarraytests;
import ee.jakarta.tck.jsonp.api.common.JsonAssert;
import ee.jakarta.tck.jsonp.api.common.SimpleValues;
import ee.jakarta.tck.jsonp.api.common.TestResult;
import java.util.ArrayList;
import jakarta.json.Json;
import jakarta.json.JsonArray;
import jakarta.json.JsonArrayBuilder;
import jakarta.json.JsonString;
import jakarta.json.JsonValue;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Logger;
import jakarta.json.JsonNumber;
// $Id$
/**
* JavaScript Object Notation (JSON) compatibility tests:
* {@link JsonArrayBuilder} API factory methods added in JSON-P 1.1.
*/
public class ArrayBuilders {
private static final Logger LOGGER = Logger.getLogger(ArrayBuilders.class.getName());
/**
* Creates an instance of {@link JsonArrayBuilder} API factory methods added
* in JSON-P 1.1 test.
*/
ArrayBuilders() {
super();
}
/**
* Test {@link JsonArrayBuilder} factory method added in JSON-P 1.1.
*
* @return Result of all tests in this suite.
*/
TestResult test() {
final TestResult result = new TestResult(
"JsonArrayBuilder API factory methods added in JSON-P 1.1.");
LOGGER.info("JsonArrayBuilder API factory methods added in JSON-P 1.1.");
testCreateFromCollection(result);
testCreateFromJsonArray(result);
testGetStringValuesAs(result);
testGetIntValuesAs(result);
return result;
}
/**
* Test {@link Json#createArrayBuilder(Collection
© 2015 - 2024 Weber Informatics LLC | Privacy Policy