Open
Description
I can't (simply) write assertions on files from the root (basedir
) of the project. I have a maven plugin that generates files outside of the target
directory. Those generated files are meant to be committed alongside the code in the (git) repository.
I should be able to write an assertion like the following:
assertThat(result).isSuccessful()
.project()
.withFile("some-file-from-basedir");
Note that withFile
right now, assumes one is looking up files in ${basedir}/target
. So changing this would a breaking change.
Right now, I'm working around this by doing something like below:
assertThat(result).isSuccessful()
.project()
.withFile("../some-file-from-basedir"); // note the `..`
But even for this, I have to create an empty target
directory, as my plugin/test does not do so.
Last note. I've discovered the project today and really like how it makes testing maven plugin finally easy and simple.