Skip to content

Conversation

@sparsick
Copy link
Contributor

@sparsick sparsick commented Oct 23, 2025

also migrates AbstractMojoTestCase to MojoTest.

AbstractMojoTestCase based test will be migrate in a seperate PR

Signed-off-by: Sandra Parsick <[email protected]>
Signed-off-by: Sandra Parsick <[email protected]>
@sparsick sparsick marked this pull request as draft November 4, 2025 08:26
Signed-off-by: Sandra Parsick <[email protected]>
Signed-off-by: Sandra Parsick <[email protected]>
Signed-off-by: Sandra Parsick <[email protected]>
Signed-off-by: Sandra Parsick <[email protected]>
@slawekjaranowski
Copy link
Member

I would like to split such PR - one update in ITs and next with unit tests updates

@sparsick
Copy link
Contributor Author

sparsick commented Nov 4, 2025

I will split it tomorrow.

Comment on lines +28 to 35
@MojoTest
public class CheckstyleExecutorTest {
@Inject
private CheckstyleExecutor executor;
@Test
public void testDefaultConfig() throws Exception {
CheckstyleExecutor executor = (CheckstyleExecutor) lookup(CheckstyleExecutor.class);
assertNotNull("project null.", executor);
assertNotNull(executor, "project null.");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like PlexusTest not MojoTest

Comment on lines +137 to +143
//
// LegacySupport legacySupport = lookup(LegacySupport.class);
// legacySupport.setSession(newMavenSession(new MavenProjectStub()));
DefaultRepositorySystemSession repoSession =
(DefaultRepositorySystemSession) legacySupport.getRepositorySession();
repoSession.setLocalRepositoryManager(new SimpleLocalRepositoryManagerFactory()
.newInstance(repoSession, new LocalRepository(artifactStubFactory.getWorkingDir())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy staff is not used by AbstractMavenReport ...
but AbstractMavenReport needs a remote repository to resolve site skin, so it looks like more integration test

There is side effect with such old staff that test is working

I need to discover how to achieve similar effect with new way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants