23d6ddec5a1caa03d12b80bd3b4833ae56e78916
[netconf.git] / restconf / restconf-nb / src / test / java / org / opendaylight / restconf / nb / rfc8040 / databind / JsonOperationInputBodyTest.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.restconf.nb.rfc8040.databind;
9
10 import java.io.InputStream;
11
12 public class JsonOperationInputBodyTest extends AbstractOperationInputBodyTest {
13     @Override
14     OperationInputBody moduleSubContainerDataPostActionBody() {
15         return new JsonOperationInputBody(stringInputStream("""
16             {
17               "instance-identifier-module:input": {
18                 "delay": 600
19               }
20             }"""));
21     }
22
23     @Override
24     OperationInputBody testEmptyBody() {
25         return new JsonOperationInputBody(InputStream.nullInputStream());
26     }
27
28     @Override
29     OperationInputBody testRpcModuleInputBody() {
30         return new JsonOperationInputBody(stringInputStream("""
31             {
32               "invoke-rpc-module:input" : {
33                 "cont" : {
34                   "lf" : "lf-test"
35                 }
36               }
37             }"""));
38     }
39 }