Package com.google.common.testing

Examples of com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods()


  @GwtIncompatible("NullPointerTester")
  public void testNulls() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(ADAPTER);
    tester.testAllPublicInstanceMethods(BIN_ADAPTER);
  }
}
View Full Code Here


  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicConstructors(MinMaxPriorityQueue.class);
    tester.testAllPublicStaticMethods(MinMaxPriorityQueue.class);
    tester.testAllPublicInstanceMethods(MinMaxPriorityQueue.<String>create());
  }

  private static void insertIntoReplica(
      Map<Integer, AtomicInteger> replica,
      int newValue) {
View Full Code Here

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableSortedMap.class);
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.<String, Integer>naturalOrder());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of("one", 1));
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.of("one", 1, "two", 2, "three", 3));
View Full Code Here

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableSortedMap.class);
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.<String, Integer>naturalOrder());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of("one", 1));
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.of("one", 1, "two", 2, "three", 3));
  }
View Full Code Here

    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableSortedMap.class);
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.<String, Integer>naturalOrder());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of("one", 1));
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.of("one", 1, "two", 2, "three", 3));
  }

  private static <K, V> void assertMapEquals(Map<K, V> map,
View Full Code Here

    tester.testAllPublicStaticMethods(ImmutableSortedMap.class);
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.<String, Integer>naturalOrder());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of());
    tester.testAllPublicInstanceMethods(ImmutableSortedMap.of("one", 1));
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.of("one", 1, "two", 2, "three", 3));
  }

  private static <K, V> void assertMapEquals(Map<K, V> map,
      Object... alternatingKeysAndValues) {
View Full Code Here

  public void testNulls() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicConstructors(AtomicLongMap.class);
    tester.testAllPublicStaticMethods(AtomicLongMap.class);
    AtomicLongMap<Object> map = AtomicLongMap.create();
    tester.testAllPublicInstanceMethods(map);
  }

  public void testCreate_map() {
    Map<String, Long> in = ImmutableMap.of("1", 1L, "2", 2L, "3", 3L);
    AtomicLongMap<String> map = AtomicLongMap.create(in);
View Full Code Here

  public void testNulls() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(Executor.class, sameThreadExecutor());
    tester.setDefault(Runnable.class, DO_NOTHING);
    tester.testAllPublicInstanceMethods(new ExecutionList());
  }

  private static final Runnable THROWING_RUNNABLE = new Runnable() {
    @Override public void run() {
      throw new RuntimeException();
View Full Code Here

  public void testNulls() throws Exception {
    NullPointerTester npTester = new NullPointerTester();
    npTester.testAllPublicConstructors(ThreadFactoryBuilder.class);
    npTester.testAllPublicStaticMethods(ThreadFactoryBuilder.class);
    npTester.testAllPublicInstanceMethods(builder);
  }
}
View Full Code Here

    @GwtIncompatible("NullPointerTester")
    public void testNullPointers() throws Exception {
      NullPointerTester tester = new NullPointerTester();
      tester.testAllPublicStaticMethods(ImmutableList.class);
      tester.testAllPublicInstanceMethods(ImmutableList.of(1, 2, 3));
    }

    @GwtIncompatible("SerializableTester")
    public void testSerialization_empty() {
      Collection<String> c = ImmutableList.of();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.