2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.codec.gson;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
12 import java.io.IOException;
13 import org.junit.jupiter.api.AfterAll;
14 import org.junit.jupiter.api.BeforeAll;
15 import org.junit.jupiter.api.Test;
17 class RFC7951YT1027Test extends AbstractYT1027Test {
18 private static JSONCodecFactory CODEC_FACTORY;
21 static void createFactory() {
22 CODEC_FACTORY = JSONCodecFactorySupplier.RFC7951.getShared(SCHEMA_CONTEXT);
26 static void destroyFactory() {
31 void testDecimalUnquotedParsing() throws IOException {
32 assertEquals(DECIMAL_DATA, fromJSON(UNQUOTED_DECIMAL));
36 void testInt64UnquotedParsing() throws IOException {
37 assertEquals(INT64_DATA, fromJSON(UNQUOTED_INT64));
41 void testUint64UnquotedParsing() throws IOException {
42 assertEquals(UINT64_DATA, fromJSON(UNQUOTED_UINT64));
46 JSONCodecFactory codecFactory() {
51 Class<?> wrapperClass() {
52 return QuotedJSONCodec.class;
56 String expectedDecimal() {
59 "yt1027:decimal": "1.1"
64 String expectedInt64() {
72 String expectedUint64() {