2 * Copyright (c) 2021 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.restconf.nb.rfc8040.rests.services.impl;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
11 import static org.junit.jupiter.api.Assertions.assertNotNull;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.junit.jupiter.api.Test;
15 import org.junit.jupiter.api.extension.ExtendWith;
16 import org.mockito.junit.jupiter.MockitoExtension;
17 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
18 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
20 @ExtendWith(MockitoExtension.class)
21 class Netconf822Test extends AbstractRestconfTest {
22 private static final @NonNull EffectiveModelContext MODEL_CONTEXT =
23 YangParserTestUtils.parseYangResourceDirectory("/nc822");
26 @NonNull EffectiveModelContext modelContext() {
31 void testOperationsContent() {
32 final var content = server.operationsGET();
35 "ietf-restconf:operations" : {
39 }""", content.toJSON());
41 <operations xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
44 </operations>""", content.toXML());
48 void testOperationsContentByIdentifier() {
49 final var content = server.operationsGET("foo:new1");
50 assertNotNull(content);
52 { "foo:new1" : [null] }""", content.toJSON());
54 <new1 xmlns="foo"/>""", content.toXML());