001/* 002 * Copyright (C) 2015 The Guava Authors 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package com.google.common.collect.testing; 018 019import com.google.common.annotations.GwtIncompatible; 020import java.util.List; 021 022/** 023 * Creates, based on your criteria, a JUnit test suite that exhaustively tests a 024 * ConcurrentNavigableMap implementation. 025 * 026 * @author Louis Wasserman 027 */ 028@GwtIncompatible 029public class ConcurrentNavigableMapTestSuiteBuilder<K, V> 030 extends NavigableMapTestSuiteBuilder<K, V> { 031 032 public static <K, V> ConcurrentNavigableMapTestSuiteBuilder<K, V> using( 033 TestSortedMapGenerator<K, V> generator) { 034 ConcurrentNavigableMapTestSuiteBuilder<K, V> result = 035 new ConcurrentNavigableMapTestSuiteBuilder<>(); 036 result.usingGenerator(generator); 037 return result; 038 } 039 040 @Override 041 protected List<Class<? extends AbstractTester>> getTesters() { 042 List<Class<? extends AbstractTester>> testers = Helpers.copyToList(super.getTesters()); 043 testers.addAll(ConcurrentMapTestSuiteBuilder.TESTERS); 044 return testers; 045 } 046 047 @Override 048 NavigableMapTestSuiteBuilder<K, V> subSuiteUsing(TestSortedMapGenerator<K, V> generator) { 049 return using(generator); 050 } 051}