Examples of testAllPublicInstanceMethods()


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

  public void testNullPointerExceptions() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Ordering.class);

    // any Ordering<Object> instance that accepts nulls should be good enough
    tester.testAllPublicInstanceMethods(Ordering.usingToString().nullsFirst());
  }

  private static <T> List<T> shuffledCopy(List<T> in, Random random) {
    List<T> mutable = newArrayList(in);
    List<T> out = newArrayList();
View Full Code Here

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

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

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

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Splitter.class);
    tester.testAllPublicInstanceMethods(Splitter.on(','));
    tester.testAllPublicInstanceMethods(Splitter.on(',').trimResults());
  }

  private static <E> List<E> asList(Collection<E> collection) {
    return ImmutableList.copyOf(collection);
View Full Code Here

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

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Splitter.class);
    tester.testAllPublicInstanceMethods(Splitter.on(','));
    tester.testAllPublicInstanceMethods(Splitter.on(',').trimResults());
  }

  private static <E> List<E> asList(Collection<E> collection) {
    return ImmutableList.copyOf(collection);
  }
View Full Code Here

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

  // null parameters test

  public void testNullParameters() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    CacheLoader<Object, Object> loader = identityLoader();
    tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader));
  }

  // stats tests

  public void testStats() {
View Full Code Here

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

    tester.testAllPublicStaticMethods(EvictingQueue.class);
    tester.testAllPublicConstructors(EvictingQueue.class);
    EvictingQueue<String> queue = EvictingQueue.create(5);
    // The queue must be non-empty so it throws a NPE correctly
    queue.add("one");
    tester.testAllPublicInstanceMethods(queue);
  }

  public void testSerialization() {
    EvictingQueue<String> original = EvictingQueue.create(5);
    original.add("one");
View Full Code Here

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

  }

  @GwtIncompatible("NullPointerTester")
  public void testStringConverter_nullPointerTester() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(Shorts.stringConverter());
  }
}
View Full Code Here

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

    }
  }

  public void testNullParameters() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(makeLocalCache(createCacheBuilder()));
    CacheLoader<Object, Object> loader = identityLoader();
    tester.testAllPublicInstanceMethods(makeLocalCache(createCacheBuilder()));
  }

  public void testSerializationProxyLoading() {
View Full Code Here

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

  public void testNullParameters() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(makeLocalCache(createCacheBuilder()));
    CacheLoader<Object, Object> loader = identityLoader();
    tester.testAllPublicInstanceMethods(makeLocalCache(createCacheBuilder()));
  }

  public void testSerializationProxyLoading() {
    CacheLoader<Object, Object> loader = new SerializableCacheLoader();
    RemovalListener<Object, Object> listener = new SerializableRemovalListener<Object, Object>();
View Full Code Here

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

  @GwtIncompatible("NullPointerTester")
  public void testStringConverter_nullPointerTester() throws Exception {
    Converter<String, TestEnum> converter = Enums.stringConverter(TestEnum.class);
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(converter);
  }

  public void testStringConverter_nullConversions() {
    Converter<String, TestEnum> converter = Enums.stringConverter(TestEnum.class);
    assertNull(converter.convert(null));
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.