After some poking around I found that with IdeaTestFixtureFactory.getFixtureFactory().createLightFixtureBuilder() I can create a testing environment where all IDEA singletons are working and my module, project and application components are loaded without the need to actually set up a project with modules that exist on my HDD. This environment is useful for many test.
Now I need an environment with more than one module and I need to add directories and files to the modules. I'd like to do this again in a lightweight manner without having the files on the disc. Is that somehow possible?
When I try to call addModule on the created fixture builder I receive an UnsupportedOperationException.
And then even if it worked, I would have to call addContentRoot on the ModuleFixtureBuilder with a String describing an existing path.
What I'm looking for is some mechanism to create and manipulate a project in memory and to run my tests against those virtual projects and modules.