File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/test/java/org/apache/maven/plugins/changes/jira Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ under the License.
331331 <dependency >
332332 <groupId >org.apache.maven.plugin-testing</groupId >
333333 <artifactId >maven-plugin-testing-harness</artifactId >
334- <version >4.0.0 -alpha-2</ version >
334+ <version >3. 4.0</ version > <!-- TODO check 4.0.0 -alpha-2-- >
335335 <scope >test</scope >
336336 </dependency >
337337 <dependency >
Original file line number Diff line number Diff line change 1818 */
1919package org .apache .maven .plugins .changes .jira ;
2020
21- import org .apache .maven .plugin .testing .AbstractMojoTestCase ;
21+ import org .apache .maven .api .plugin .testing .InjectMojo ;
22+ import org .apache .maven .api .plugin .testing .MojoParameter ;
23+ import org .apache .maven .api .plugin .testing .MojoTest ;
2224import org .junit .jupiter .api .Test ;
2325
2426import static org .junit .jupiter .api .Assertions .assertFalse ;
2931 * @author jrh3k5
3032 * @since 2.8
3133 */
32- public class JiraChangesReportTest extends AbstractMojoTestCase {
33- private final JiraChangesReport mojo = new JiraChangesReport ( null );
34+ @ MojoTest
35+ public class JiraChangesReportTest {
3436
3537 /**
3638 * If the mojo has been marked to be skipped, then it should indicate that the report cannot be generated.
3739 *
3840 * @throws Exception If any errors occur during the test run.
3941 */
42+
4043 @ Test
41- public void testCanGenerateReportSkipped () throws Exception {
42- setVariableValueToObject (mojo , "skip" , Boolean .TRUE );
44+ @ InjectMojo (goal ="jira-changes" )
45+ @ MojoParameter (name = "skip" , value = "true" )
46+ public void testCanGenerateReportSkipped (JiraChangesReport mojo ) {
4347 assertFalse (mojo .canGenerateReport ());
4448 }
4549}
You can’t perform that action at this time.
0 commit comments