Bug 5085: Clean-up test and retest JUnit tests
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / YangParserNegativeTest.java
similarity index 88%
rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/retest/YangParserNegativeTest.java
rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/YangParserNegativeTest.java
index cd6e6f5ff5443b3ff75440146cfc8812da1fc510..29543ee044925e853727b1cb2bd8885f6d62f491 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * 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.yang.stmt.retest;
+package org.opendaylight.yangtools.yang.stmt;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -22,13 +22,10 @@ import java.util.List;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.opendaylight.yangtools.yang.model.parser.api.YangContextParser;
-import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
 import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SomeModifiersUnresolvedException;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.parser.util.NamedFileInputStream;
-import org.opendaylight.yangtools.yang.parser.util.YangValidationException;
 
 public class YangParserNegativeTest {
 
@@ -243,34 +240,6 @@ public class YangParserNegativeTest {
         }
     }
 
-    @Test
-    public void testWrongDependenciesDir() throws Exception {
-        try {
-            File yangFile = new File(getClass().getResource("/types/custom-types-test@2012-4-4.yang").toURI());
-            File dependenciesDir = new File("/invalid");
-            YangContextParser parser = new YangParserImpl();
-            parser.parseFile(yangFile, dependenciesDir);
-            fail("Exception should be thrown");
-        } catch (IllegalStateException e) {
-            String expected = File.separator + "invalid does not exists";
-            assertEquals(expected, e.getMessage());
-        }
-    }
-
-    @Test
-    public void testWrongDependenciesDir2() throws Exception {
-        try {
-            File yangFile = new File(getClass().getResource("/types/custom-types-test@2012-4-4.yang").toURI());
-            File dependenciesDir = new File(getClass().getResource("/model").toURI());
-            YangContextParser parser = new YangParserImpl();
-            parser.parseFile(yangFile, dependenciesDir);
-            fail("Exception should be thrown");
-        } catch (YangValidationException e) {
-            String expected = "Not existing module imported";
-            assertTrue(e.getMessage().contains(expected));
-        }
-    }
-
     @Test
     public void testInvalidListKeyDefinition() throws Exception {
         File yang1 = new File(getClass().getResource("/negative-scenario/invalid-list-key-def.yang").toURI());