guava

Форк
0
/
ConcurrentNavigableMapTestSuiteBuilder.java 
52 строки · 1.7 Кб
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

17
package com.google.common.collect.testing;
18

19
import com.google.common.annotations.GwtIncompatible;
20
import 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
29
public class ConcurrentNavigableMapTestSuiteBuilder<K, V>
30
    extends NavigableMapTestSuiteBuilder<K, V> {
31

32
  public static <K, V> ConcurrentNavigableMapTestSuiteBuilder<K, V> using(
33
      TestSortedMapGenerator<K, V> generator) {
34
    ConcurrentNavigableMapTestSuiteBuilder<K, V> result =
35
        new ConcurrentNavigableMapTestSuiteBuilder<>();
36
    result.usingGenerator(generator);
37
    return result;
38
  }
39

40
  @SuppressWarnings("rawtypes") // class literals
41
  @Override
42
  protected List<Class<? extends AbstractTester>> getTesters() {
43
    List<Class<? extends AbstractTester>> testers = Helpers.copyToList(super.getTesters());
44
    testers.addAll(ConcurrentMapTestSuiteBuilder.TESTERS);
45
    return testers;
46
  }
47

48
  @Override
49
  NavigableMapTestSuiteBuilder<K, V> subSuiteUsing(TestSortedMapGenerator<K, V> generator) {
50
    return using(generator);
51
  }
52
}
53

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.