I want to test my code with "real" data. This data can be reused in every test in the suite since is read only data.
The loading of the data is lengthy and I would like to reuse the loaded data all through the suite (in numerous test cases). Right now I store the data as a static field. Something like this:
Context.setData(new DataReader().getData(url));
What would be a more "JUnit" way of doing this (i.e loading a big bulk of data and use it in several test cases)? I really don't like this as it has evident drawbacks. For example, who initializes the data?
What other options do I have to achieve this?