Java Code Examples for com.google.common.collect.testing.SetTestSuiteBuilder
The following examples show how to use
com.google.common.collect.testing.SetTestSuiteBuilder. These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: rdf4j Source File: ModelCollectionTest.java License: BSD 3-Clause "New" or "Revised" License | 6 votes |
public Test testModelImpl(String name, ModelFactory factory) { try { return SetTestSuiteBuilder.using(new TestModelGenerator(factory)) .named(name) .withFeatures(CollectionSize.ANY, CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION, CollectionFeature.SERIALIZABLE, CollectionFeature.SUPPORTS_ADD, CollectionFeature.SUPPORTS_ITERATOR_REMOVE, CollectionFeature.SUPPORTS_REMOVE, CollectionFeature.NON_STANDARD_TOSTRING) // FIXME suppressing test on iterator element remove behavior .suppressing(CollectionIteratorTester.class .getDeclaredMethod("testIterator_unknownOrderRemoveSupported")) .createTestSuite(); } catch (NoSuchMethodException | SecurityException e) { throw new RuntimeException(e); } }
Example 2
Source Project: cyclops Source File: SetXTestSuite.java License: Apache License 2.0 | 5 votes |
public Test testForOneToWayUseMySet() { return SetTestSuiteBuilder .using(new SetXGenerator()) .named("setX test") .withFeatures( CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES, CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION, CollectionFeature.SUPPORTS_ADD, CollectionFeature.SUPPORTS_ITERATOR_REMOVE, CollectionFeature.SUPPORTS_REMOVE ) .createTestSuite(); }
Example 3
Source Project: cyclops Source File: SortedSetTestSuite.java License: Apache License 2.0 | 5 votes |
public Test testForOneToWayUseMySet() { return SetTestSuiteBuilder .using(new SetXGenerator()) .named("setX test") .withFeatures( CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES, CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION, CollectionFeature.SUPPORTS_ADD, CollectionFeature.SUPPORTS_ITERATOR_REMOVE, CollectionFeature.SUPPORTS_REMOVE ) .createTestSuite(); }
Example 4
Source Project: agrona Source File: ObjectHashSetConformanceTest.java License: Apache License 2.0 | 5 votes |
public static TestSuite suite() { return SetTestSuiteBuilder.using(new Generator()) .named("ObjectHashSet Tests") .withFeatures(CollectionSize.ANY, CollectionFeature.NON_STANDARD_TOSTRING, CollectionFeature.SUPPORTS_ADD, CollectionFeature.SUPPORTS_REMOVE, CollectionFeature.SUPPORTS_ITERATOR_REMOVE, CollectionFeature.REMOVE_OPERATIONS) .createTestSuite(); }
Example 5
Source Project: JCTools Source File: SingleWriterHashSetTest.java License: Apache License 2.0 | 5 votes |
public static Test suite() throws Exception { return SetTestSuiteBuilder.using(new TestStringSetGenerator() { @Override protected Set<String> create(String[] elements) { Set<String> set = new SingleWriterHashSet<>(elements.length); Collections.addAll(set, elements); return set; } }).withFeatures( SetFeature.GENERAL_PURPOSE, CollectionSize.ANY, CollectionFeature.NON_STANDARD_TOSTRING) .named(SingleWriterHashSet.class.getSimpleName()) .createTestSuite(); }