Be careful of static field when unit testing!

Basically, the value of static field will remain across test cases. So either you don't use static field, or remember to reset its value to default value in setUp(). Be careful, or you will get the most tricky bug promisingly.

你可能感兴趣的:(Be careful of static field when unit testing!)