2 * Copyright (c) 2016 Cisco Systems, Inc. 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.restconf.nb.jaxrs;
10 import org.junit.jupiter.api.Test;
11 import org.junit.jupiter.api.extension.ExtendWith;
12 import org.mockito.junit.jupiter.MockitoExtension;
13 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
14 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
16 @ExtendWith(MockitoExtension.class)
17 class RestconfYangLibraryVersionGetTest extends AbstractRestconfTest {
19 EffectiveModelContext modelContext() {
20 return YangParserTestUtils.parseYangResourceDirectory("/restconf/impl");
24 void testLibraryVersion() {
25 final var body = assertFormattableBody(200, ar -> restconf.yangLibraryVersionGET(ar));
28 {"ietf-restconf:yang-library-version":"2019-01-04"}""", body::formatToJSON, false);
30 <yang-library-version xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">2019-01-04\
31 </yang-library-version>""", body::formatToXML, false);