Access to the Filer is trivial to add to CompilationRule. What I can't figure out is how to propagate the generated content back to the test to assert on the generated sources. At the very least it would require a change to Compilation to inject the InMemoryJavaFileManager so it could also be made available to the test but that brings other dependencies with it. Perhaps Compilation should be more stateful than just static helpers?
I'm not doing any actual compilation. I want to only test interactions with a Filer and assert on its outputs.
Happy to implement, just want guidance/approval on the approach.
Access to the
Fileris trivial to add toCompilationRule. What I can't figure out is how to propagate the generated content back to the test to assert on the generated sources. At the very least it would require a change toCompilationto inject theInMemoryJavaFileManagerso it could also be made available to the test but that brings other dependencies with it. PerhapsCompilationshould be more stateful than just static helpers?I'm not doing any actual compilation. I want to only test interactions with a
Filerand assert on its outputs.Happy to implement, just want guidance/approval on the approach.