blob: 462dccbfa66c58c893f2491c2a4569fb09bf129e [file] [log] [blame]
Rama-Huaweib711e5c2016-08-31 07:55:46 +05301/*
2 * Copyright 2016-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.yms.app.yob;
18
19import org.junit.Test;
20import org.onosproject.yms.app.ydt.YangRequestWorkBench;
21import org.onosproject.yms.app.ydt.YdtExtendedContext;
22import org.onosproject.yms.app.ydt.YdtTestUtils;
23import org.onosproject.yms.ydt.YdtContext;
24
25import static org.junit.Assert.assertNotNull;
26
27public class YobIetfNetworkTest {
28
29 @Test
30 public void ietfNetwork1Test() {
31 YangRequestWorkBench defaultYdtBuilder = YdtTestUtils.ietfNetwork1Ydt();
32 validateYangObject(defaultYdtBuilder);
33 }
34
35 private void validateYangObject(YangRequestWorkBench defaultYdtBuilder) {
36
37 YdtContext rootCtx = defaultYdtBuilder.getRootNode();
38
39 YdtContext childCtx = rootCtx.getFirstChild();
40
41 DefaultYobBuilder builder = new DefaultYobBuilder();
42
43 Object yangObject = builder.getYangObject(
44 (YdtExtendedContext) childCtx, YdtTestUtils
45 .getSchemaRegistry());
46 assertNotNull(yangObject);
47 //TODO yangObject need to verify
48 }
49}