Reputation: 2185
The problem I have is that I need to do some System.properties
modifications and checks when the application starts AND when tests start running.
How do get code to run basically as soon as the JVM can start running code? I tried a package object but I couldn't seem to get it to execute the code unless it was invoked.
Upvotes: 0
Views: 94
Reputation: 170713
Just make all your test classes extend an abstract base class which calls the initialization code in the constructor.
Upvotes: 3