use of org.eclipse.tycho.core.shared.BuildPropertiesImpl in project tycho by eclipse.
the class BuildPropertiesParserForTesting method parse.
@Override
public BuildProperties parse(File baseDir) {
Properties props = new Properties();
readBuildProperties(baseDir, props);
return new BuildPropertiesImpl(props);
}
use of org.eclipse.tycho.core.shared.BuildPropertiesImpl in project tycho by eclipse.
the class IncludeValidationHelperTest method testCheckSourceIncludesDontExist.
@Test
public void testCheckSourceIncludesDontExist() throws Exception {
BuildPropertiesImpl buildProperties = createBuildProperties("src.includes", "foo3, bar3*,**/*.me");
try {
subject.checkSourceIncludesExist(createMockProject(), buildProperties, true);
fail();
} catch (MojoExecutionException e) {
assertStringContains("src.includes value(s) [foo3, bar3*] do not match any files.", e.getMessage());
}
}
use of org.eclipse.tycho.core.shared.BuildPropertiesImpl in project tycho by eclipse.
the class IncludeValidationHelperTest method testCheckSourceIncludesExistAntPatterns.
@Test
public void testCheckSourceIncludesExistAntPatterns() throws Exception {
BuildPropertiesImpl buildProperties = createBuildProperties("src.includes", "foo.txt, bar*,**/*.me");
subject.checkSourceIncludesExist(createMockProject(), buildProperties, true);
}
use of org.eclipse.tycho.core.shared.BuildPropertiesImpl in project tycho by eclipse.
the class IncludeValidationHelperTest method testWarning.
@Test
public void testWarning() throws Exception {
final List<String> warnings = new ArrayList<>();
Logger log = new AbstractLogger(Logger.LEVEL_DEBUG, null) {
@Override
public void warn(String message, Throwable throwable) {
warnings.add(message);
}
@Override
public void info(String message, Throwable throwable) {
Assert.fail();
}
@Override
public Logger getChildLogger(String name) {
return null;
}
@Override
public void fatalError(String message, Throwable throwable) {
Assert.fail();
}
@Override
public void error(String message, Throwable throwable) {
Assert.fail();
}
@Override
public void debug(String message, Throwable throwable) {
Assert.fail();
}
};
IncludeValidationHelper subject = new IncludeValidationHelper(log);
BuildPropertiesImpl buildProperties = createBuildProperties("src.includes", "foo3, bar3*,**/*.me");
MavenProject project = createMockProject();
subject.checkSourceIncludesExist(project, buildProperties, false);
Assert.assertEquals(1, warnings.size());
Assert.assertEquals(new File(project.getBasedir(), "build.properties").getAbsolutePath() + ": src.includes value(s) [foo3, bar3*] do not match any files.", warnings.get(0));
}
use of org.eclipse.tycho.core.shared.BuildPropertiesImpl in project tycho by eclipse.
the class IncludeValidationHelperTest method testCheckBinIncludesExistAntPatterns.
@Test
public void testCheckBinIncludesExistAntPatterns() throws Exception {
BuildPropertiesImpl buildProperties = createBuildProperties("bin.includes", "foo.txt, bar*,**/*.me");
subject.checkBinIncludesExist(createMockProject(), buildProperties, true);
}
Aggregations