Merge "Fixing ForwardingRulesManager code that got lost in a previous merge"
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / java / org / opendaylight / controller / yang / model / parser / builder / impl / TestUtils.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. 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.controller.yang.model.parser.builder.impl;
9
10 import java.net.URI;
11 import java.util.ArrayList;
12 import java.util.List;
13
14 import org.opendaylight.controller.yang.common.QName;
15 import org.opendaylight.controller.yang.model.api.SchemaPath;
16
17 public class TestUtils {
18
19     private TestUtils() {
20     }
21
22     public static SchemaPath createSchemaPath(boolean absolute, URI namespace,
23             String... path) {
24         List<QName> names = new ArrayList<QName>();
25         QName qname;
26         for (String pathPart : path) {
27             qname = new QName(namespace, pathPart);
28             names.add(qname);
29         }
30         return new SchemaPath(names, absolute);
31     }
32
33 }