[ONOS-3880, 3881] Yang Listener for Module and Sub-Module
Change-Id: Iee75c3e04af9b66ebc38acb3396aa4c54af5a268
diff --git a/src/test/resources/BelongsToDualPrefix.yang b/src/test/resources/BelongsToDualPrefix.yang
new file mode 100644
index 0000000..37973da
--- /dev/null
+++ b/src/test/resources/BelongsToDualPrefix.yang
@@ -0,0 +1,8 @@
+submodule Test {
+yang-version 1;
+belongs-to ONOS {
+prefix On1;
+prefix On2;
+}
+}
+
diff --git a/src/test/resources/BelongsToWithPrefix.yang b/src/test/resources/BelongsToWithPrefix.yang
new file mode 100644
index 0000000..75a13ca
--- /dev/null
+++ b/src/test/resources/BelongsToWithPrefix.yang
@@ -0,0 +1,6 @@
+submodule Test {
+yang-version 1;
+belongs-to ONOS {
+prefix On1;
+}
+}
diff --git a/src/test/resources/BelongsToWithoutPrefix.yang b/src/test/resources/BelongsToWithoutPrefix.yang
new file mode 100644
index 0000000..eaf9885
--- /dev/null
+++ b/src/test/resources/BelongsToWithoutPrefix.yang
@@ -0,0 +1,6 @@
+submodule Test {
+yang-version 1;
+belongs-to ONOS {
+}
+}
+
diff --git a/src/test/resources/ContactDualEntryTest.yang b/src/test/resources/ContactDualEntryTest.yang
new file mode 100644
index 0000000..2dca10e
--- /dev/null
+++ b/src/test/resources/ContactDualEntryTest.yang
@@ -0,0 +1,9 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+organization "IETF SPRING Working Group";
+contact "WG List";
+contact "Invalid";
+}
+
diff --git a/src/test/resources/ContactIncorrectOrder.yang b/src/test/resources/ContactIncorrectOrder.yang
new file mode 100644
index 0000000..237d003
--- /dev/null
+++ b/src/test/resources/ContactIncorrectOrder.yang
@@ -0,0 +1,7 @@
+module Test {
+yang-version 1;
+contact "Test";
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+organization "IETF SPRING Working Group";
+}
diff --git a/src/test/resources/ContactValidEntry.yang b/src/test/resources/ContactValidEntry.yang
new file mode 100644
index 0000000..f88e147
--- /dev/null
+++ b/src/test/resources/ContactValidEntry.yang
@@ -0,0 +1,9 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+organization "IETF SPRING Working Group";
+contact "WG List: <mailto:spring@ietf.org>
+Editor: Stephane Litkowski
+ <mailto:stephane.litkowski@orange.com>";
+}
diff --git a/src/test/resources/ContactWithEmptyString.yang b/src/test/resources/ContactWithEmptyString.yang
new file mode 100644
index 0000000..34c6008
--- /dev/null
+++ b/src/test/resources/ContactWithEmptyString.yang
@@ -0,0 +1,7 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+organization "IETF SPRING Working Group";
+contact;
+}
diff --git a/src/test/resources/ImportInvalidOrder.yang b/src/test/resources/ImportInvalidOrder.yang
new file mode 100644
index 0000000..6bfc685
--- /dev/null
+++ b/src/test/resources/ImportInvalidOrder.yang
@@ -0,0 +1,10 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+revision-date 2015-02-03;
+prefix On1;
+}
+contact "Test";
+}
diff --git a/src/test/resources/ImportMultipleInstance.yang b/src/test/resources/ImportMultipleInstance.yang
new file mode 100644
index 0000000..175f2ff
--- /dev/null
+++ b/src/test/resources/ImportMultipleInstance.yang
@@ -0,0 +1,14 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+import itut {
+prefix On3;
+revision-date 2016-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/ImportValidEntry.yang b/src/test/resources/ImportValidEntry.yang
new file mode 100644
index 0000000..b725d39
--- /dev/null
+++ b/src/test/resources/ImportValidEntry.yang
@@ -0,0 +1,10 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/ImportWithDualPrefix.yang b/src/test/resources/ImportWithDualPrefix.yang
new file mode 100644
index 0000000..8b40bb0
--- /dev/null
+++ b/src/test/resources/ImportWithDualPrefix.yang
@@ -0,0 +1,11 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On1;
+prefix On2;
+revision-date 2015-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/ImportWithoutPrefix.yang b/src/test/resources/ImportWithoutPrefix.yang
new file mode 100644
index 0000000..ee68e59
--- /dev/null
+++ b/src/test/resources/ImportWithoutPrefix.yang
@@ -0,0 +1,9 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+revision-date 2015-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/ImportWithoutRevision.yang b/src/test/resources/ImportWithoutRevision.yang
new file mode 100644
index 0000000..af47b7a
--- /dev/null
+++ b/src/test/resources/ImportWithoutRevision.yang
@@ -0,0 +1,9 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+}
+contact "Test";
+}
diff --git a/src/test/resources/IncludeImportAnyOrder.yang b/src/test/resources/IncludeImportAnyOrder.yang
new file mode 100644
index 0000000..05339a6
--- /dev/null
+++ b/src/test/resources/IncludeImportAnyOrder.yang
@@ -0,0 +1,16 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+include itut {
+revision-date 2016-02-03;
+}
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/IncludeInvalidDateSyntax.yang b/src/test/resources/IncludeInvalidDateSyntax.yang
new file mode 100644
index 0000000..3716209
--- /dev/null
+++ b/src/test/resources/IncludeInvalidDateSyntax.yang
@@ -0,0 +1,16 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 16-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/IncludeInvalidSyntax.yang b/src/test/resources/IncludeInvalidSyntax.yang
new file mode 100644
index 0000000..91ae17b
--- /dev/null
+++ b/src/test/resources/IncludeInvalidSyntax.yang
@@ -0,0 +1,16 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut; {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/IncludeMultiInstance.yang b/src/test/resources/IncludeMultiInstance.yang
new file mode 100644
index 0000000..81a527a
--- /dev/null
+++ b/src/test/resources/IncludeMultiInstance.yang
@@ -0,0 +1,16 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/IncludeWithDate.yang b/src/test/resources/IncludeWithDate.yang
new file mode 100644
index 0000000..9701a2d
--- /dev/null
+++ b/src/test/resources/IncludeWithDate.yang
@@ -0,0 +1,13 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/IncludeWithEmptyBody.yang b/src/test/resources/IncludeWithEmptyBody.yang
new file mode 100644
index 0000000..471fdb3
--- /dev/null
+++ b/src/test/resources/IncludeWithEmptyBody.yang
@@ -0,0 +1,12 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+}
+contact "Test";
+}
diff --git a/src/test/resources/IncludeWithStmtend.yang b/src/test/resources/IncludeWithStmtend.yang
new file mode 100644
index 0000000..e40813b
--- /dev/null
+++ b/src/test/resources/IncludeWithStmtend.yang
@@ -0,0 +1,11 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut;
+contact "Test";
+}
diff --git a/src/test/resources/ModuleValidEntry.yang b/src/test/resources/ModuleValidEntry.yang
new file mode 100644
index 0000000..439ded8
--- /dev/null
+++ b/src/test/resources/ModuleValidEntry.yang
@@ -0,0 +1,5 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+}
diff --git a/src/test/resources/ModuleWithInvalidIdentifier.yang b/src/test/resources/ModuleWithInvalidIdentifier.yang
new file mode 100644
index 0000000..d89340a
--- /dev/null
+++ b/src/test/resources/ModuleWithInvalidIdentifier.yang
@@ -0,0 +1,5 @@
+module Test:Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+}
diff --git a/src/test/resources/NamespaceDualEntry.yang b/src/test/resources/NamespaceDualEntry.yang
new file mode 100644
index 0000000..09c9b54
--- /dev/null
+++ b/src/test/resources/NamespaceDualEntry.yang
@@ -0,0 +1,6 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+namespace urn:ietf:params:xml:ns:yang:ietf-segment-routing;
+prefix On;
+}
diff --git a/src/test/resources/NamespaceInDoubleQuotes.yang b/src/test/resources/NamespaceInDoubleQuotes.yang
new file mode 100644
index 0000000..aec0042
--- /dev/null
+++ b/src/test/resources/NamespaceInDoubleQuotes.yang
@@ -0,0 +1,5 @@
+module Test {
+yang-version 1;
+namespace "urn:ietf:params:xml:ns:yang:ietf-ospf";
+prefix On;
+}
diff --git a/src/test/resources/NamespaceNoEntryTest.yang b/src/test/resources/NamespaceNoEntryTest.yang
new file mode 100644
index 0000000..ac30ae4
--- /dev/null
+++ b/src/test/resources/NamespaceNoEntryTest.yang
@@ -0,0 +1,4 @@
+module Test {
+yang-version 1;
+prefix On;
+}
diff --git a/src/test/resources/NamespaceWithConcatenationTest.yang b/src/test/resources/NamespaceWithConcatenationTest.yang
new file mode 100644
index 0000000..c9ac4b0
--- /dev/null
+++ b/src/test/resources/NamespaceWithConcatenationTest.yang
@@ -0,0 +1,6 @@
+module Test {
+yang-version 1;
+namespace "urn:ietf:params:xml:ns:"
+ + "yang:ietf-segment-routing";
+prefix On;
+}
diff --git a/src/test/resources/NamespaceWithInvalidSpaces.yang b/src/test/resources/NamespaceWithInvalidSpaces.yang
new file mode 100644
index 0000000..f8f91c5
--- /dev/null
+++ b/src/test/resources/NamespaceWithInvalidSpaces.yang
@@ -0,0 +1,5 @@
+module Test {
+yang-version 1;
+namespace "urn:ietf:params:xml :ns:yang:ietf-ospf";
+prefix On;
+}
diff --git a/src/test/resources/NamespaceWithoutQuotes.yang b/src/test/resources/NamespaceWithoutQuotes.yang
new file mode 100644
index 0000000..439ded8
--- /dev/null
+++ b/src/test/resources/NamespaceWithoutQuotes.yang
@@ -0,0 +1,5 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+}
diff --git a/src/test/resources/OrganizationDualEntry.yang b/src/test/resources/OrganizationDualEntry.yang
new file mode 100644
index 0000000..64bf23d
--- /dev/null
+++ b/src/test/resources/OrganizationDualEntry.yang
@@ -0,0 +1,18 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "IETF SPRING Working Group";
+organization "ITUT SPRING Working Group";
+}
diff --git a/src/test/resources/OrganizationInvalidOrder.yang b/src/test/resources/OrganizationInvalidOrder.yang
new file mode 100644
index 0000000..333f2e5
--- /dev/null
+++ b/src/test/resources/OrganizationInvalidOrder.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+organization "ONOS";
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut; {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+}
diff --git a/src/test/resources/OrganizationMissingValue.yang b/src/test/resources/OrganizationMissingValue.yang
new file mode 100644
index 0000000..e9e3f46
--- /dev/null
+++ b/src/test/resources/OrganizationMissingValue.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization ;
+}
diff --git a/src/test/resources/OrganizationValidEntry.yang b/src/test/resources/OrganizationValidEntry.yang
new file mode 100644
index 0000000..25ae1ec
--- /dev/null
+++ b/src/test/resources/OrganizationValidEntry.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "IETF SPRING Working Group";
+}
diff --git a/src/test/resources/PrefixDualEntry.yang b/src/test/resources/PrefixDualEntry.yang
new file mode 100644
index 0000000..e999774
--- /dev/null
+++ b/src/test/resources/PrefixDualEntry.yang
@@ -0,0 +1,18 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+prefix On3;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/PrefixInvalidValue.yang b/src/test/resources/PrefixInvalidValue.yang
new file mode 100644
index 0000000..40f7617
--- /dev/null
+++ b/src/test/resources/PrefixInvalidValue.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix -On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/PrefixMissingValue.yang b/src/test/resources/PrefixMissingValue.yang
new file mode 100644
index 0000000..4d92ee1
--- /dev/null
+++ b/src/test/resources/PrefixMissingValue.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix ;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/PrefixOrder.yang b/src/test/resources/PrefixOrder.yang
new file mode 100644
index 0000000..d14e8b1
--- /dev/null
+++ b/src/test/resources/PrefixOrder.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+prefix test;
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/PrefixValidEntry.yang b/src/test/resources/PrefixValidEntry.yang
new file mode 100644
index 0000000..826dee4
--- /dev/null
+++ b/src/test/resources/PrefixValidEntry.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/RevisionDateInQuotesAtImport.yang b/src/test/resources/RevisionDateInQuotesAtImport.yang
new file mode 100644
index 0000000..5f8bcb8
--- /dev/null
+++ b/src/test/resources/RevisionDateInQuotesAtImport.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+import ietf {
+prefix On2;
+revision-date "2015-02-03";
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/RevisionDateInQuotesAtInclude.yang b/src/test/resources/RevisionDateInQuotesAtInclude.yang
new file mode 100644
index 0000000..de405a3
--- /dev/null
+++ b/src/test/resources/RevisionDateInQuotesAtInclude.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date "2016-02-03";
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/RevisionDateInvalidFormat.yang b/src/test/resources/RevisionDateInvalidFormat.yang
new file mode 100644
index 0000000..8a6c717
--- /dev/null
+++ b/src/test/resources/RevisionDateInvalidFormat.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+import ietf {
+prefix On2;
+revision-date 15-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/RevisionDateInvalidSyntaxAtImport.yang b/src/test/resources/RevisionDateInvalidSyntaxAtImport.yang
new file mode 100644
index 0000000..df726bf
--- /dev/null
+++ b/src/test/resources/RevisionDateInvalidSyntaxAtImport.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+import ietf {
+prefix On2;
+revision-date 2015/02/03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/RevisionDateInvalidSyntaxAtInclude.yang b/src/test/resources/RevisionDateInvalidSyntaxAtInclude.yang
new file mode 100644
index 0000000..ea5631e
--- /dev/null
+++ b/src/test/resources/RevisionDateInvalidSyntaxAtInclude.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016/02/03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/RevisionDateValidEntry.yang b/src/test/resources/RevisionDateValidEntry.yang
new file mode 100644
index 0000000..dbf4d3a
--- /dev/null
+++ b/src/test/resources/RevisionDateValidEntry.yang
@@ -0,0 +1,17 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/RevisionInValidOrder.yang b/src/test/resources/RevisionInValidOrder.yang
new file mode 100644
index 0000000..c60d434
--- /dev/null
+++ b/src/test/resources/RevisionInValidOrder.yang
@@ -0,0 +1,9 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+revision 2016-02-03;
+include itut {
+revision-date 2016-02-03;
+}
+}
diff --git a/src/test/resources/RevisionInValidSyntax.yang b/src/test/resources/RevisionInValidSyntax.yang
new file mode 100644
index 0000000..1795b3e
--- /dev/null
+++ b/src/test/resources/RevisionInValidSyntax.yang
@@ -0,0 +1,8 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+contact "Test";
+organization "ONOS";
+revision;
+}
diff --git a/src/test/resources/RevisionNoOptionalParameter.yang b/src/test/resources/RevisionNoOptionalParameter.yang
new file mode 100644
index 0000000..664204e
--- /dev/null
+++ b/src/test/resources/RevisionNoOptionalParameter.yang
@@ -0,0 +1,8 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix test;
+contact "Test";
+organization "ONOS";
+revision 2016-02-03;
+}
diff --git a/src/test/resources/SubModuleInvalidName.yang b/src/test/resources/SubModuleInvalidName.yang
new file mode 100644
index 0000000..7da9397
--- /dev/null
+++ b/src/test/resources/SubModuleInvalidName.yang
@@ -0,0 +1,18 @@
+submodule Test:Test {
+belongs-to ONOS {
+prefix On1;
+}
+yang-version 1;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/SubModuleOrder.yang b/src/test/resources/SubModuleOrder.yang
new file mode 100644
index 0000000..9779bbb
--- /dev/null
+++ b/src/test/resources/SubModuleOrder.yang
@@ -0,0 +1,18 @@
+submodule Test {
+belongs-to ONOS {
+prefix On1;
+}
+yang-version 1;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/SubModuleValidEntry.yang b/src/test/resources/SubModuleValidEntry.yang
new file mode 100644
index 0000000..00ecdca
--- /dev/null
+++ b/src/test/resources/SubModuleValidEntry.yang
@@ -0,0 +1,18 @@
+submodule Test {
+yang-version 1;
+belongs-to ONOS {
+prefix On1;
+}
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/SubModuleWithNamespace.yang b/src/test/resources/SubModuleWithNamespace.yang
new file mode 100644
index 0000000..d7a38f7
--- /dev/null
+++ b/src/test/resources/SubModuleWithNamespace.yang
@@ -0,0 +1,19 @@
+submodule Test {
+belongs-to ONOS {
+prefix On1;
+}
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/SubModuleWithoutBelongsTo.yang b/src/test/resources/SubModuleWithoutBelongsTo.yang
new file mode 100644
index 0000000..4a25209
--- /dev/null
+++ b/src/test/resources/SubModuleWithoutBelongsTo.yang
@@ -0,0 +1,3 @@
+submodule Test {
+yang-version 1;
+}
diff --git a/src/test/resources/SubModuleWithoutVersion.yang b/src/test/resources/SubModuleWithoutVersion.yang
new file mode 100644
index 0000000..f44df8b
--- /dev/null
+++ b/src/test/resources/SubModuleWithoutVersion.yang
@@ -0,0 +1,17 @@
+submodule Test {
+belongs-to ONOS {
+prefix On1;
+}
+import ietf {
+prefix On2;
+revision-date 2015-02-03;
+}
+include itut {
+revision-date 2016-02-03;
+}
+include sdn {
+revision-date 2014-02-03;
+}
+contact "Test";
+organization "ONOS";
+}
diff --git a/src/test/resources/VersionDualEntry.yang b/src/test/resources/VersionDualEntry.yang
new file mode 100644
index 0000000..f8eaddd
--- /dev/null
+++ b/src/test/resources/VersionDualEntry.yang
@@ -0,0 +1,6 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+yang-version 1;
+}
diff --git a/src/test/resources/VersionInvalidSyntax.yang b/src/test/resources/VersionInvalidSyntax.yang
new file mode 100644
index 0000000..26cb0b2
--- /dev/null
+++ b/src/test/resources/VersionInvalidSyntax.yang
@@ -0,0 +1,5 @@
+module Test {
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+yang-version ;
+}
diff --git a/src/test/resources/VersionInvalidValue.yang b/src/test/resources/VersionInvalidValue.yang
new file mode 100644
index 0000000..e8e6107
--- /dev/null
+++ b/src/test/resources/VersionInvalidValue.yang
@@ -0,0 +1,5 @@
+module Test {
+yang-version 2;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+}
diff --git a/src/test/resources/VersionNotPresent.yang b/src/test/resources/VersionNotPresent.yang
new file mode 100644
index 0000000..eed9953
--- /dev/null
+++ b/src/test/resources/VersionNotPresent.yang
@@ -0,0 +1,4 @@
+module Test {
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+}
diff --git a/src/test/resources/VersionOrder.yang b/src/test/resources/VersionOrder.yang
new file mode 100644
index 0000000..92463e9
--- /dev/null
+++ b/src/test/resources/VersionOrder.yang
@@ -0,0 +1,5 @@
+module Test {
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+yang-version 1;
+}
diff --git a/src/test/resources/VersionValidEntry.yang b/src/test/resources/VersionValidEntry.yang
new file mode 100644
index 0000000..439ded8
--- /dev/null
+++ b/src/test/resources/VersionValidEntry.yang
@@ -0,0 +1,5 @@
+module Test {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix On;
+}
diff --git a/src/test/resources/YangFileWithSyntaxError.yang b/src/test/resources/YangFileWithSyntaxError.yang
new file mode 100644
index 0000000..413a181
--- /dev/null
+++ b/src/test/resources/YangFileWithSyntaxError.yang
@@ -0,0 +1,6 @@
+module Antlrtest {
+yang-version 1
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix Ant;
+}
+
diff --git a/src/test/resources/YangFileWithoutSyntaxError.yang b/src/test/resources/YangFileWithoutSyntaxError.yang
new file mode 100644
index 0000000..4f4839f
--- /dev/null
+++ b/src/test/resources/YangFileWithoutSyntaxError.yang
@@ -0,0 +1,6 @@
+module Antlrtest {
+yang-version 1;
+namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+prefix Ant;
+}
+