Changed $Yang* generation package and name
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / test / java / org / opendaylight / mdsal / binding / java / api / generator / AugmentToUsesInAugmentCompilationTest.java
index 16b9cc226161ac4f349850e98e641ff826957cf1..bac49f5892b074d5f6312bb0c541b61f51de742a 100644 (file)
@@ -25,43 +25,49 @@ public class AugmentToUsesInAugmentCompilationTest extends BaseCompilationTest {
         generateTestSources("/compilation/augment-uses-to-augment", sourcesOutputDir);
 
         // Test if all sources are generated from 'module foo'
-        File fooParent = new File(sourcesOutputDir, CompilationTestUtils.NS_FOO);
+        final File fooParent = new File(sourcesOutputDir, CompilationTestUtils.NS_FOO);
         assertTrue(new File(fooParent, "FooData.java").exists());
         assertTrue(new File(fooParent, "IgpLinkAttributes.java").exists());
         assertTrue(new File(fooParent, "Link1.java").exists());
         assertTrue(new File(fooParent, "Link1Builder.java").exists());
-        CompilationTestUtils.assertFilesCount(fooParent, 6);
+        CompilationTestUtils.assertFilesCount(fooParent, 5);
+        final File fooSvcParent = new File(sourcesOutputDir, CompilationTestUtils.NS_SVC_FOO);
+        CompilationTestUtils.assertFilesCount(fooSvcParent, 1);
 
         // Test if all sources are generated from 'module bar'
-        File barParent = new File(sourcesOutputDir, CompilationTestUtils.NS_BAR);
+        final File barParent = new File(sourcesOutputDir, CompilationTestUtils.NS_BAR);
         assertTrue(new File(barParent, "BarData.java").exists());
         assertTrue(new File(barParent, "NetworkTopology.java").exists());
         assertTrue(new File(barParent, "NetworkTopologyBuilder.java").exists());
         assertTrue(new File(barParent, "Link.java").exists());
         assertTrue(new File(barParent, "LinkAttributes.java").exists());
-        CompilationTestUtils.assertFilesCount(barParent, 8);
+        CompilationTestUtils.assertFilesCount(barParent, 7);
+        final File barSvcParent = new File(sourcesOutputDir, CompilationTestUtils.NS_SVC_BAR);
+        CompilationTestUtils.assertFilesCount(barSvcParent, 1);
 
-        File networkParent = new File(barParent, "network");
+        final File networkParent = new File(barParent, "network");
         CompilationTestUtils.assertFilesCount(networkParent, 1);
-        File topologyParent = new File(networkParent, "topology");
+        final File topologyParent = new File(networkParent, "topology");
         assertTrue(new File(topologyParent, "Topology.java").exists());
         assertTrue(new File(topologyParent, "TopologyBuilder.java").exists());
         assertTrue(new File(topologyParent, "TopologyKey.java").exists());
         CompilationTestUtils.assertFilesCount(topologyParent, 3);
 
-        File linkParent = new File(barParent, "link");
+        final File linkParent = new File(barParent, "link");
         assertTrue(new File(linkParent, "Link.java").exists());
         assertTrue(new File(linkParent, "LinkBuilder.java").exists());
         assertTrue(new File(linkParent, "LinkKey.java").exists());
         CompilationTestUtils.assertFilesCount(linkParent, 3);
 
         // Test if all sources are generated from 'module baz'
-        File bazParent = new File(sourcesOutputDir, CompilationTestUtils.NS_BAZ);
+        final File bazParent = new File(sourcesOutputDir, CompilationTestUtils.NS_BAZ);
         assertTrue(new File(bazParent, "BazData.java").exists());
         assertTrue(new File(bazParent, "IgpLinkAttributes1.java").exists());
         assertTrue(new File(bazParent, "IgpLinkAttributes1Builder.java").exists());
         assertTrue(new File(bazParent, "LinkAttributes.java").exists());
-        CompilationTestUtils.assertFilesCount(bazParent, 6);
+        CompilationTestUtils.assertFilesCount(bazParent, 5);
+        final File bazSvcParent = new File(sourcesOutputDir, CompilationTestUtils.NS_SVC_BAZ);
+        CompilationTestUtils.assertFilesCount(bazSvcParent, 1);
 
         // Test if sources are compilable
         CompilationTestUtils.testCompilation(sourcesOutputDir, compiledOutputDir);