/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
+
package org.opendaylight.yangtools.sal.binding.yang.types;
+import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
+import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
+
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
-import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
/**
* Test Model Provider designated to load test resources and provide Schema Context
return arrayList;
}
- public static SchemaContext createTestContext() {
- YangParserImpl parser = new YangParserImpl();
- Set<Module> modules = parser.parseYangModelsFromStreams(provideTestModelStreams());
- return parser.resolveSchemaContext(modules);
+ public static SchemaContext createTestContext() throws SourceException, ReactorException {
+ return RetestUtils.parseYangStreams(provideTestModelStreams());
}
}