Fix checkstyle in mdsal-binding-generator-impl
[mdsal.git] / binding / mdsal-binding-generator-impl / src / test / java / org / opendaylight / mdsal / binding / generator / impl / BinaryTypeTest.java
index 4cb2cdbd8e491bcab7a4128e5cd4eec0d1744baa..c3a55b03493d659e6fb73b641b82fb12c7c4cc96 100644 (file)
@@ -11,7 +11,6 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
@@ -19,34 +18,30 @@ import java.util.List;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.mdsal.binding.generator.api.BindingGenerator;
-import org.opendaylight.mdsal.binding.generator.impl.BindingGeneratorImpl;
 import org.opendaylight.mdsal.binding.model.api.Type;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
-import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
 public class BinaryTypeTest {
-    private final static List<File> yangModels = new ArrayList<>();
-    private final static URL yangModelsFolder = AugmentedTypeTest.class
-            .getResource("/binary-type-test-models");
+    private static final List<File> YANG_MODELS = new ArrayList<>();
+    private static final URL YANG_MODELS_FOLDER = AugmentedTypeTest.class.getResource("/binary-type-test-models");
 
     @BeforeClass
     public static void loadTestResources() throws URISyntaxException {
-        final File augFolder = new File(yangModelsFolder.toURI());
+        final File augFolder = new File(YANG_MODELS_FOLDER.toURI());
         for (final File fileEntry : augFolder.listFiles()) {
             if (fileEntry.isFile()) {
-                yangModels.add(fileEntry);
+                YANG_MODELS.add(fileEntry);
             }
         }
     }
 
     @Test
-    public void binaryTypeTest() throws IOException, SourceException, ReactorException {
-        final SchemaContext context = YangParserTestUtils.parseYangSources(yangModels);
+    public void binaryTypeTest() {
+        final SchemaContext context = YangParserTestUtils.parseYangFiles(YANG_MODELS);
 
         assertNotNull("context is null", context);
-        final BindingGenerator bindingGen = new BindingGeneratorImpl(true);
+        final BindingGenerator bindingGen = new BindingGeneratorImpl();
         final List<Type> genTypes = bindingGen.generateTypes(context);
 
         assertNotNull("genTypes is null", genTypes);