java - Instance Variable in JUnit - Stack Overflow
The reason for the list
not being updated the second time is because of the behavior of Junit
. Junit
creates an instance of the test class for each test. So, a new object is created for each test case and the list
is reinitialized every time.
Read full article from java - Instance Variable in JUnit - Stack Overflow
No comments:
Post a Comment