Is there a way that i can copy in a base project into my testkit test? meaning, i am testing a simple compiler, so in addition to the task, i need the source folders and a few sample source files copied into the test. I know i can just manually create folders and copy files into the testproject folder but i was hoping there was some kind of constructor overload where i could do something like this
@Rule
final TemporaryFolder temporaryFolder = new TemporaryFolder("resources/mytest1")
and it copies the contents of mytest1 into the temporary folder and we call it finished.
The short answer is that there’s currently no support for your use case in TestKit. I personally like to set up up my test fixtures as part of the test code and not as predefined files that live in the project. It simply gives me more flexibility. It should be fairly straight-forward to write a JUnit rule for it though.