With JUnit 4, how can I have a global mutable list...
# test
j
With JUnit 4, how can I have a global mutable list? Basically, I want a mutable list of ints that I can ad test ids to, then at the end, print them out. Is there some global
TestWatcher
that I’m not familiar with? The
TestWatcher
allows me to grab the data I need at the end of each test, but I want to add that data to a global list and when the entire test suite is finished, then do something with that data. Does that make sense?