How to test ArrayList using JUnit

 In practice, we may need write test case to test List.

Sometimes we need to overwrite the inner objects' hashCode() and equals().

If the List only contains String object, we can write test cases as  http://www.java2s.com/Code/Java/Development-Class/SimpleuseofJUnittotestArrayList.htm.

For user-defined objects, we should overwrite its methods.

http://stackoverflow.com/questions/3236880/assert-list-in-junit

http://www.vogella.de/articles/JUnit/article.html

你可能感兴趣的:(test,unit,JUnit,职场,ArrayList,休闲)