X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-maven-plugin%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang2sources%2Fplugin%2FYangToSourcesMojoTest.java;h=041b24198bda0a818bd949e1229504d935434b95;hb=bc1c0861e1c229cfee7465b84b5fd15eb462a3bf;hp=cf0fc4b3bfa673e31cd9dc9e0aa47d65f3eec765;hpb=8dacdc2b6097844d54f85f300fd96e8f0c79cc8e;p=yangtools.git diff --git a/yang/yang-maven-plugin/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesMojoTest.java b/yang/yang-maven-plugin/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesMojoTest.java index cf0fc4b3bf..041b24198b 100644 --- a/yang/yang-maven-plugin/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesMojoTest.java +++ b/yang/yang-maven-plugin/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesMojoTest.java @@ -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 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()); } }