use of org.apache.maven.plugins.invoker.InvokerProperties in project maven-plugins by apache.
the class InvokerPropertiesTest method testIsExpectedResult.
public void testIsExpectedResult() throws Exception {
Properties props = new Properties();
InvokerProperties facade = new InvokerProperties(props);
assertTrue(facade.isExpectedResult(0, 0));
assertFalse(facade.isExpectedResult(1, 0));
props.setProperty("invoker.buildResult", "success");
assertTrue(facade.isExpectedResult(0, 0));
assertFalse(facade.isExpectedResult(1, 0));
props.setProperty("invoker.buildResult", "failure");
assertFalse(facade.isExpectedResult(0, 0));
assertTrue(facade.isExpectedResult(1, 0));
}
use of org.apache.maven.plugins.invoker.InvokerProperties in project maven-plugins by apache.
the class InvokerPropertiesTest method testConstructorNullSafe.
public void testConstructorNullSafe() throws Exception {
InvokerProperties facade = new InvokerProperties(null);
assertNotNull(facade.getProperties());
}
use of org.apache.maven.plugins.invoker.InvokerProperties in project maven-plugins by apache.
the class InvokerPropertiesTest method testIsSelectedDefined.
public void testIsSelectedDefined() {
Properties props = new Properties();
InvokerProperties facade = new InvokerProperties(props);
assertFalse(facade.isSelectorDefined(1));
props.setProperty("invoker.java.version", "1.6+");
props.setProperty("invoker.maven.version", "3.0+");
props.setProperty("invoker.os.family", "windows");
assertFalse(facade.isSelectorDefined(1));
props.setProperty("selector.2.java.version", "1.6+");
props.setProperty("selector.3.maven.version", "3.0+");
props.setProperty("selector.4.os.family", "windows");
assertFalse(facade.isSelectorDefined(1));
assertTrue(facade.isSelectorDefined(2));
assertTrue(facade.isSelectorDefined(3));
assertTrue(facade.isSelectorDefined(4));
assertFalse(facade.isSelectorDefined(5));
}
use of org.apache.maven.plugins.invoker.InvokerProperties in project maven-plugins by apache.
the class InvokerPropertiesTest method testConfigureRequestMavenOpts.
public void testConfigureRequestMavenOpts() throws Exception {
Properties props = new Properties();
InvokerProperties facade = new InvokerProperties(props);
InvocationRequest request = new DefaultInvocationRequest();
request.setMavenOpts("default");
facade.configureInvocation(request, 0);
assertEquals("default", request.getMavenOpts());
props.setProperty("invoker.mavenOpts", "-Xmx512m");
facade.configureInvocation(request, 0);
assertEquals("-Xmx512m", request.getMavenOpts());
}
use of org.apache.maven.plugins.invoker.InvokerProperties in project maven-plugins by apache.
the class InvokerPropertiesTest method testGetInvokerProperty.
public void testGetInvokerProperty() throws Exception {
Properties props = new Properties();
InvokerProperties facade = new InvokerProperties(props);
assertNull(facade.get("undefined-key", 0));
props.setProperty("key", "value");
assertEquals("value", facade.get("key", 1));
props.setProperty("key.1", "another-value");
assertEquals("another-value", facade.get("key", 1));
assertEquals("value", facade.get("key", 2));
}
Aggregations