Guest User

Untitled

a guest
Dec 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. private Test myListTestSuite() {
  2. return ListTestSuiteBuilder.using(
  3. // This class is responsible for creating the collection
  4. // And providing data, which can be put into the collection
  5. // Here we use a abstract generator which will create strings
  6. // which will be put into the collection
  7. new TestStringListGenerator(){
  8. @Override
  9. protected List<String> create(String[] elements) {
  10. // Fill here your collection with the given elements
  11. return new MyListImplementation<String>(elements);
  12. }
  13. })
  14. // The name of the test suite
  15. .named("My List Tests")
  16. // Here we give a hit what features our collection supports
  17. .withFeatures(ListFeature.GENERAL_PURPOSE,
  18. CollectionFeature.ALLOWS_NULL_VALUES,
  19. CollectionFeature.SERIALIZABLE,
  20. CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION,
  21. CollectionSize.ANY)
  22. .createTestSuite();
  23. }
Add Comment
Please, Sign In to add comment