BUG-7568: Use YangTextSchemaSource to emit schema files
[yangtools.git] / yang / yang-maven-plugin / src / test / java / org / opendaylight / yangtools / yang2sources / plugin / YangToSourcesMojoTest.java
index cf0fc4b3bfa673e31cd9dc9e0aa47d65f3eec765..041b24198bda0a818bd949e1229504d935434b95 100644 (file)
@@ -37,7 +37,7 @@ public class YangToSourcesMojoTest {
     private YangToSourcesProcessor proc;
 
     @Test
-    public void yangToSourceMojoTest() throws Exception{
+    public void yangToSourceMojoTest() throws Exception {
         Mockito.when(this.project.getPlugin(YangToSourcesMojo.PLUGIN_NAME)).thenReturn(this.plugin);
 
         this.mojo = new YangToSourcesMojo();
@@ -67,13 +67,14 @@ public class YangToSourcesMojoTest {
         final File excludedYang = new File(getClass().getResource("/yang/excluded-file.yang").getFile());
         final String path = file.getPath();
         final List<CodeGeneratorArg> codeGenerators = new ArrayList<>();
-        final CodeGeneratorArg codeGeneratorArg = new CodeGeneratorArg(GeneratorMock.class.getName(), path);
+        final CodeGeneratorArg codeGeneratorArg = new CodeGeneratorArg(GeneratorMock.class.getName(),
+                "target/YangToSourcesMojoTest-outputBaseDir");
         codeGenerators.add(codeGeneratorArg);
         final MavenProject mvnProject = Mockito.mock(MavenProject.class);
         final Build build = new Build();
         Mockito.when(mvnProject.getBuild()).thenReturn(build);
         final boolean dependencies = true;
         this.proc = new YangToSourcesProcessor(file, ImmutableList.of(excludedYang), codeGenerators,
-                mvnProject, dependencies, new YangProvider());
+                mvnProject, dependencies, YangProvider.getInstance());
     }
 }