1 /* 2 * Copyright (C) 2008 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 17 package com.google.common.collect.testing; 18 19 import com.google.common.annotations.GwtIncompatible; 20 import com.google.common.collect.testing.testers.CollectionAddAllTester; 21 import com.google.common.collect.testing.testers.CollectionAddTester; 22 import com.google.common.collect.testing.testers.CollectionClearTester; 23 import com.google.common.collect.testing.testers.CollectionContainsAllTester; 24 import com.google.common.collect.testing.testers.CollectionContainsTester; 25 import com.google.common.collect.testing.testers.CollectionCreationTester; 26 import com.google.common.collect.testing.testers.CollectionEqualsTester; 27 import com.google.common.collect.testing.testers.CollectionForEachTester; 28 import com.google.common.collect.testing.testers.CollectionIsEmptyTester; 29 import com.google.common.collect.testing.testers.CollectionIteratorTester; 30 import com.google.common.collect.testing.testers.CollectionRemoveAllTester; 31 import com.google.common.collect.testing.testers.CollectionRemoveIfTester; 32 import com.google.common.collect.testing.testers.CollectionRemoveTester; 33 import com.google.common.collect.testing.testers.CollectionRetainAllTester; 34 import com.google.common.collect.testing.testers.CollectionSerializationTester; 35 import com.google.common.collect.testing.testers.CollectionSizeTester; 36 import com.google.common.collect.testing.testers.CollectionSpliteratorTester; 37 import com.google.common.collect.testing.testers.CollectionStreamTester; 38 import com.google.common.collect.testing.testers.CollectionToArrayTester; 39 import com.google.common.collect.testing.testers.CollectionToStringTester; 40 import java.util.Arrays; 41 import java.util.Collection; 42 import java.util.List; 43 44 /** 45 * Abstract superclass of all test-suite builders for collection interfaces. 46 * 47 * @author George van den Driessche 48 */ 49 @GwtIncompatible 50 public abstract class AbstractCollectionTestSuiteBuilder< 51 B extends AbstractCollectionTestSuiteBuilder<B, E>, E> 52 extends PerCollectionSizeTestSuiteBuilder<B, TestCollectionGenerator<E>, Collection<E>, E> { 53 // Class parameters must be raw. 54 @SuppressWarnings("unchecked") 55 @Override getTesters()56 protected List<Class<? extends AbstractTester>> getTesters() { 57 return Arrays.<Class<? extends AbstractTester>>asList( 58 CollectionAddAllTester.class, 59 CollectionAddTester.class, 60 CollectionClearTester.class, 61 CollectionContainsAllTester.class, 62 CollectionContainsTester.class, 63 CollectionCreationTester.class, 64 CollectionEqualsTester.class, 65 CollectionForEachTester.class, 66 CollectionIsEmptyTester.class, 67 CollectionIteratorTester.class, 68 CollectionRemoveAllTester.class, 69 CollectionRemoveIfTester.class, 70 CollectionRemoveTester.class, 71 CollectionRetainAllTester.class, 72 CollectionSerializationTester.class, 73 CollectionSizeTester.class, 74 CollectionSpliteratorTester.class, 75 CollectionStreamTester.class, 76 CollectionToArrayTester.class, 77 CollectionToStringTester.class); 78 } 79 } 80