ggkochanski commented on code in PR #132:
URL: https://github.com/apache/maven-help-plugin/pull/132#discussion_r2485962566
##########
src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java:
##########
@@ -114,6 +114,29 @@ void testEvaluateWithoutExpressionWithOutput(EvaluateMojo
mojo) throws Exception
verify(inputHandler, times(2)).readLine();
}
+ /**
+ * Tests evaluation of a complex expression.
+ * @throws Exception in case of errors.
+ */
+ public void testEvaluateForComplexExpression() throws Exception {
+ File testPom = new File(getBasedir(),
"target/test-classes/unit/evaluate/plugin-config-complex.xml");
+
+ EvaluateMojo mojo = (EvaluateMojo) lookupMojo("evaluate", testPom);
+
+ ExpressionEvaluator expressionEvaluator =
mock(PluginParameterExpressionEvaluator.class);
+
when(expressionEvaluator.evaluate("project_version=${project.version}"))
+ .thenReturn("project_version=1.0.0-SNAPSHOT");
+
+ setUpMojo(mojo, null, expressionEvaluator);
Review Comment:
done and green :heavy_check_mark:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]