Move ASTSchemaSource and its components into rfc6020.repo
[yangtools.git] / yang / yang-model-export / src / test / java / org / opendaylight / yangtools / yang / model / export / test / SimpleModuleTest.java
index 546741aa9ce378fc434439d279e1458cba626a9e..3ab8c7a6815e8c92f006f5908294264a56b55ee4 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2015 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.yang.model.export.test;
 
 import java.io.File;
@@ -22,7 +29,7 @@ import org.opendaylight.yangtools.yang.model.repo.spi.SchemaListenerRegistration
 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceListener;
 import org.opendaylight.yangtools.yang.model.repo.util.FilesystemSchemaSourceCache;
 import org.opendaylight.yangtools.yang.parser.repo.SharedSchemaRepository;
-import org.opendaylight.yangtools.yang.parser.util.TextToASTTransformer;
+import org.opendaylight.yangtools.yang.parser.rfc6020.repo.TextToASTTransformer;
 
 public class SimpleModuleTest {
 
@@ -79,7 +86,7 @@ public class SimpleModuleTest {
     }
 
     private void testSetOfModules(final Collection<SourceIdentifier> source) throws Exception {
-        final SchemaContext schemaContext = schemaContextFactory.createSchemaContext(source).checkedGet();
+        final SchemaContext schemaContext = schemaContextFactory.createSchemaContext(source).get();
         final File outDir = new File("target/collection");
         outDir.mkdirs();
         for (final Module module : schemaContext.getModules()) {
@@ -87,7 +94,7 @@ public class SimpleModuleTest {
         }
     }
 
-    private File exportModule(final SchemaContext schemaContext, final Module module, final File outDir)
+    private static File exportModule(final SchemaContext schemaContext, final Module module, final File outDir)
             throws Exception {
         final File outFile = new File(outDir, YinExportUtils.wellFormedYinName(module.getName(), module.getRevision()));
         try (OutputStream output = new FileOutputStream(outFile)) {