Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect.testing;
import static com.google.common.collect.testing.DerivedCollectionGenerators.keySetGenerator;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.collect.testing.DerivedCollectionGenerators.MapEntrySetGenerator;
import com.google.common.collect.testing.DerivedCollectionGenerators.MapValueCollectionGenerator;
import com.google.common.collect.testing.features.CollectionFeature;
import com.google.common.collect.testing.features.CollectionSize;
import com.google.common.collect.testing.features.Feature;
import com.google.common.collect.testing.features.MapFeature;
import com.google.common.collect.testing.testers.MapClearTester;
import com.google.common.collect.testing.testers.MapComputeIfAbsentTester;
import com.google.common.collect.testing.testers.MapComputeIfPresentTester;
import com.google.common.collect.testing.testers.MapComputeTester;
import com.google.common.collect.testing.testers.MapContainsKeyTester;
import com.google.common.collect.testing.testers.MapContainsValueTester;
import com.google.common.collect.testing.testers.MapCreationTester;
import com.google.common.collect.testing.testers.MapEntrySetTester;
import com.google.common.collect.testing.testers.MapEqualsTester;
import com.google.common.collect.testing.testers.MapForEachTester;
import com.google.common.collect.testing.testers.MapGetOrDefaultTester;
import com.google.common.collect.testing.testers.MapGetTester;
import com.google.common.collect.testing.testers.MapHashCodeTester;
import com.google.common.collect.testing.testers.MapIsEmptyTester;
import com.google.common.collect.testing.testers.MapMergeTester;
import com.google.common.collect.testing.testers.MapPutAllTester;
import com.google.common.collect.testing.testers.MapPutIfAbsentTester;
import com.google.common.collect.testing.testers.MapPutTester;
import com.google.common.collect.testing.testers.MapRemoveEntryTester;
import com.google.common.collect.testing.testers.MapRemoveTester;
import com.google.common.collect.testing.testers.MapReplaceAllTester;
import com.google.common.collect.testing.testers.MapReplaceEntryTester;
import com.google.common.collect.testing.testers.MapReplaceTester;
import com.google.common.collect.testing.testers.MapSerializationTester;
import com.google.common.collect.testing.testers.MapSizeTester;
import com.google.common.collect.testing.testers.MapToStringTester;
import com.google.common.testing.SerializableTester;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import junit.framework.TestSuite;
/**
* Creates, based on your criteria, a JUnit test suite that exhaustively tests a Map implementation.
*
* @author George van den Driessche
*/
@GwtIncompatible
public class MapTestSuiteBuilder
extends PerCollectionSizeTestSuiteBuilder<
MapTestSuiteBuilder, TestMapGenerator, Map, Entry> {
public static MapTestSuiteBuilder using(TestMapGenerator generator) {
return new MapTestSuiteBuilder().usingGenerator(generator);
}
@SuppressWarnings("rawtypes") // class literals
@Override
protected List> getTesters() {
return Arrays.>asList(
MapClearTester.class,
MapComputeTester.class,
MapComputeIfAbsentTester.class,
MapComputeIfPresentTester.class,
MapContainsKeyTester.class,
MapContainsValueTester.class,
MapCreationTester.class,
MapEntrySetTester.class,
MapEqualsTester.class,
MapForEachTester.class,
MapGetTester.class,
MapGetOrDefaultTester.class,
MapHashCodeTester.class,
MapIsEmptyTester.class,
MapMergeTester.class,
MapPutTester.class,
MapPutAllTester.class,
MapPutIfAbsentTester.class,
MapRemoveTester.class,
MapRemoveEntryTester.class,
MapReplaceTester.class,
MapReplaceAllTester.class,
MapReplaceEntryTester.class,
MapSerializationTester.class,
MapSizeTester.class,
MapToStringTester.class);
}
@Override
protected List createDerivedSuites(
FeatureSpecificTestSuiteBuilder<
?, ? extends OneSizeTestContainerGenerator