2 * Copyright (c) 2014 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.controller.sal.restconf.impl.cnsn.to.xml.test;
10 import org.opendaylight.controller.sal.restconf.impl.test.DummyType;
11 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
12 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
13 import org.opendaylight.yangtools.yang.parser.builder.impl.ContainerSchemaNodeBuilder;
14 import org.opendaylight.yangtools.yang.parser.builder.impl.LeafSchemaNodeBuilder;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
18 public class CnSnToXmlNotExistingLeafTypeTest {
20 private static final Logger LOG = LoggerFactory.getLogger(CnSnToXmlNotExistingLeafTypeTest.class);
23 private DataSchemaNode prepareDataSchemaNode() {
24 final ContainerSchemaNodeBuilder contBuild = new ContainerSchemaNodeBuilder("module", 1, TestUtils.buildQName("cont",
25 "simple:uri", "2012-12-17"), null);
26 final LeafSchemaNodeBuilder leafBuild = new LeafSchemaNodeBuilder("module", 2, TestUtils.buildQName("lf1",
27 "simple:uri", "2012-12-17"), null);
28 leafBuild.setType(new DummyType());
29 leafBuild.setConfiguration(true);
31 contBuild.addChildNode(leafBuild);
32 return contBuild.build();