Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Test myListTestSuite() {
- return ListTestSuiteBuilder.using(
- // This class is responsible for creating the collection
- // And providing data, which can be put into the collection
- // Here we use a abstract generator which will create strings
- // which will be put into the collection
- new TestStringListGenerator(){
- @Override
- protected List<String> create(String[] elements) {
- // Fill here your collection with the given elements
- return new MyListImplementation<String>(elements);
- }
- })
- // The name of the test suite
- .named("My List Tests")
- // Here we give a hit what features our collection supports
- .withFeatures(ListFeature.GENERAL_PURPOSE,
- CollectionFeature.ALLOWS_NULL_VALUES,
- CollectionFeature.SERIALIZABLE,
- CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION,
- CollectionSize.ANY)
- .createTestSuite();
- }
Add Comment
Please, Sign In to add comment