import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Range;
import java.io.Serializable;
-import java.util.List;
import java.util.Optional;
import java.util.Set;
import org.junit.Rule;
import org.opendaylight.yangtools.yang.model.api.type.Int16TypeDefinition;
import org.opendaylight.yangtools.yang.model.api.type.Uint16TypeDefinition;
import org.opendaylight.yangtools.yang.model.util.BaseConstraints;
-import org.opendaylight.yangtools.yang.model.util.DataNodeIterator;
+import org.opendaylight.yangtools.yang.model.util.SchemaNodeUtils;
import org.opendaylight.yangtools.yang.model.util.type.BaseTypes;
import org.opendaylight.yangtools.yang.model.util.type.DerivedTypes;
import org.opendaylight.yangtools.yang.model.util.type.InvalidLengthConstraintException;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
public class BindingGeneratorUtilTest {
- private static final SchemaPath ROOT_PATH = SchemaPath.create(true, QName.create("test", "/root"));
+ private static final SchemaPath ROOT_PATH = SchemaPath.create(true, QName.create("test", "root"));
@Rule
public ExpectedException expectedEx = ExpectedException.none();
"org.opendaylight.yang.gen.v1.urn.m.o.d.u.l.e.n.a.m.e.t.e.s.t._case._1digit.rev130910", packageName);
// test of the method packageNameForGeneratedType()
- DataNodeIterator it = new DataNodeIterator(module);
- List<ContainerSchemaNode> schemaContainers = it.allContainers();
String subPackageNameForDataNode = "";
- for (ContainerSchemaNode containerSchemaNode : schemaContainers) {
+ for (ContainerSchemaNode containerSchemaNode : SchemaNodeUtils.getAllContainers(module)) {
if (containerSchemaNode.getQName().getLocalName().equals("cont-inner")) {
subPackageNameForDataNode = BindingGeneratorUtil.packageNameForGeneratedType(packageName,
containerSchemaNode.getPath());