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();
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());
}
}