use of com.google.common.collect.testing.TestStringMapGenerator in project guava by hceylan.
the class ForwardingNavigableMapTest method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(ForwardingNavigableMapTest.class);
suite.addTest(NavigableMapTestSuiteBuilder.using(new TestStringMapGenerator() {
@Override
protected Map<String, String> create(Entry<String, String>[] entries) {
NavigableMap<String, String> map = new SafeTreeMap<String, String>();
for (Entry<String, String> entry : entries) {
map.put(entry.getKey(), entry.getValue());
}
return new StandardImplForwardingNavigableMap<String, String>(map);
}
@Override
public Iterable<Entry<String, String>> order(List<Entry<String, String>> insertionOrder) {
return sort(insertionOrder);
}
}).named("ForwardingNavigableMap[SafeTreeMap] with no comparator and standard " + "implementations").withFeatures(CollectionSize.ANY, CollectionFeature.KNOWN_ORDER, MapFeature.ALLOWS_NULL_VALUES, MapFeature.GENERAL_PURPOSE).createTestSuite());
// TODO(user): add forwarding-to-ImmutableSortedMap test
return suite;
}
Aggregations