Guava-Testlib provides a comprehensive test suite for verifying custom Java collection implementations. By implementing a TestGenerator and using the appropriate TestSuiteBuilder, developers can automatically generate thorough tests covering all behaviors of standard JDK and Guava collection interfaces (Set, List, Map, Multimap, etc.). The builder accepts feature flags like ALLOWS_NULL_VALUES or SUPPORTS_ADD to tailor tests to the specific implementation, and also verifies the absence of unspecified features.

5m read timeFrom nipafx.dev
Post cover image
Table of contents
▚ Setup▚ Test Your Implementations▚ Reflection

Sort: