You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course it does not feel good to introduce duplicated code en mass, but we need to start somewhere.
I duplicated parameters and UpdateParentMojo#resolveTargetVersion to DisplayParentUpdatesMojo.
I duplicated UpdateParentMojoTest to DisplayParentUpdatesMojoTest. All tests asserting the actual updates are ignored at the moment. I need to figure out how to assert the actual console output.
I added another Test, DisplayParentUpdatesMojoOutputTest which is based on AbstractMojoTestCase like all other Display*Tests. As soon as I add a parent to my test-cases pom, test execution will fail with
java.lang.IllegalArgumentException: Invalid repository system session: LocalRepositoryManager is not set.
This is coming from DefaultRepositorySystem::validateSession, which is usually called -- too bad you didn't provide a stack trace ;) -- from RepositorySystem::resolveVersion.
You either need to mock the call so that it returns what you want (see e.g. MockUtils) or just use the regular integration tests (the "it" directory).
@ajarmoniuk I gave up on the *Output test. Instead, I aligned DisplayParentUpdatesMojoOutputTest (new) with UpdateParentMojoTest. Could you please review my changes?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1016