Case statement has instantiated schema tree policy
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / Bug3799Test.java
index 0c5a40ed007aa995ddf0c6ac1ef9720652e36830..f4137be82da56ea48dfec5fc9e86dddf051c1d7a 100644 (file)
@@ -5,7 +5,6 @@
  * 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;
 
 import static org.junit.Assert.assertEquals;
@@ -13,13 +12,13 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import java.util.Collection;
-import java.util.Set;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.Submodule;
 
 public class Bug3799Test {
 
@@ -28,25 +27,23 @@ public class Bug3799Test {
         SchemaContext schema = StmtTestUtils.parseYangSources("/bugs/bug3799");
         assertNotNull(schema);
 
-        Set<Module> modules = schema.getModules();
+        Collection<? extends Module> modules = schema.getModules();
         assertNotNull(modules);
         assertEquals(1, modules.size());
 
         Module testModule = modules.iterator().next();
-        Set<Module> subModules = testModule.getSubmodules();
+        Collection<? extends Submodule> subModules = testModule.getSubmodules();
         assertNotNull(subModules);
         assertEquals(1, subModules.size());
 
-        Module testSubmodule = subModules.iterator().next();
+        Submodule testSubmodule = subModules.iterator().next();
 
-        Set<NotificationDefinition> notifications = testSubmodule
-                .getNotifications();
+        Collection<? extends NotificationDefinition> notifications = testSubmodule.getNotifications();
         assertNotNull(notifications);
         assertEquals(1, notifications.size());
 
-        NotificationDefinition bazNotification = notifications.iterator()
-                .next();
-        Collection<DataSchemaNode> childNodes = bazNotification.getChildNodes();
+        NotificationDefinition bazNotification = notifications.iterator().next();
+        Collection<? extends DataSchemaNode> childNodes = bazNotification.getChildNodes();
         assertNotNull(childNodes);
         assertEquals(1, childNodes.size());
 
@@ -57,5 +54,4 @@ public class Bug3799Test {
         String bar = leafBar.getQName().getLocalName();
         assertEquals("bar", bar);
     }
-
 }