guava
1/*
2* Copyright (C) 2015 The Guava Authors
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*/
16
17package com.google.common.collect.testing;18
19import com.google.common.annotations.GwtIncompatible;20import java.util.List;21
22/**
23* Creates, based on your criteria, a JUnit test suite that exhaustively tests a
24* ConcurrentNavigableMap implementation.
25*
26* @author Louis Wasserman
27*/
28@GwtIncompatible
29public class ConcurrentNavigableMapTestSuiteBuilder<K, V>30extends NavigableMapTestSuiteBuilder<K, V> {31
32public static <K, V> ConcurrentNavigableMapTestSuiteBuilder<K, V> using(33TestSortedMapGenerator<K, V> generator) {34ConcurrentNavigableMapTestSuiteBuilder<K, V> result =35new ConcurrentNavigableMapTestSuiteBuilder<>();36result.usingGenerator(generator);37return result;38}39
40@SuppressWarnings("rawtypes") // class literals41@Override42protected List<Class<? extends AbstractTester>> getTesters() {43List<Class<? extends AbstractTester>> testers = Helpers.copyToList(super.getTesters());44testers.addAll(ConcurrentMapTestSuiteBuilder.TESTERS);45return testers;46}47
48@Override49NavigableMapTestSuiteBuilder<K, V> subSuiteUsing(TestSortedMapGenerator<K, V> generator) {50return using(generator);51}52}
53