Open JWT007 opened 2 years ago
Maybe this request makes no sense... sorry I am no assertj expert and am sort of learning by doing now.
I guess to get the Model you need to do the satisfies/assertThat to get at the "actual" where the Model
lives. Since I am assuming you don't want to write AssertJ extensions for the whole Maven model. :)
But if I am not totally off :) (not the subject of this issue)...
It should be relatively easy to add the following to MavenProjectResultAssert
since you are saving the Optional<MavenProjectResultAssert> parent
.
public MavenProjectResultAssert hasParent()
public MavenProjectResultAssert parent()
I don't know if this is even possible but I thought I would throw it out there. :) Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is.
Currently it is possible to get the maven
Model
from the execution result.result.getMavenProjectResult().getModel()
In a multi-module project, you can currently only get the path to a nested POM and use the MavenXpp3Reader to read it to get the nested Model.
Describe the solution you'd like A clear and concise description of what you want to happen.
If possible it would be great if there was a convenience function to get the Model of a sub-module in a multi-module project.
result.getMavenProjectResult().getModule("myjars").getModule("jar1").getModel()
.. or something along those lines. :).
It would reduce the test size by a few lines and eliminate the need for a helper function (at least in my code :P)