Examples of testAllPublicStaticMethods()


Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

  }

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(BiMap.class, ImmutableBiMap.of());
    tester.testAllPublicStaticMethods(Maps.class);
  }

  private static final Map<Integer,Integer> EMPTY
      = Collections.emptyMap();
  private static final Map<Integer,Integer> SINGLETON
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

    assertEquals(Collections.singleton(array), set);
  }

  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableSet.class);
  }

  public void testChooseTableSize() {
    assertEquals(8, Hashing.chooseTableSize(3));
    assertEquals(16, Hashing.chooseTableSize(4));
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

*/
public class ObjectArraysTest extends TestCase {

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ObjectArrays.class);
  }

  public void testNewArray_fromClass_Empty() {
    String[] empty = ObjectArrays.newArray(String.class, 0);
    assertEquals(String[].class, empty.getClass());
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

    return ImmutableSortedSet.copyOf(elements);
  }

  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableSortedSet.class);
  }

  public void testEmpty_comparator() {
    SortedSet<String> set = ImmutableSortedSet.of();
    assertSame(Ordering.natural(), set.comparator());
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

      return list;
    }

    public void testNullPointers() throws Exception {
      NullPointerTester tester = new NullPointerTester();
      tester.testAllPublicStaticMethods(ImmutableList.class);
      // TODO: get this re-enabled
      // tester.testAllPublicInstanceMethods(ImmutableList.of(1, 2, 3));
    }

    public void testSerialization_empty() {
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

    assertFalse(changed);
  }

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Iterators.class);
  }

  private static abstract class EmptyIteratorTester
      extends IteratorTester<Integer> {
    protected EmptyIteratorTester() {
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

    }
  }

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Iterables.class);
  }

  // More exhaustive tests are in IteratorsTest.
  public void testElementsEqual() throws Exception {
    Iterable<?> a;
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

        .createTestSuite();
  }

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Collections2.class);
  }
}
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

    assertEquals(SOME_COLLECTION, list);
  }

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Lists.class);
  }

  /**
   * This is just here to illustrate how {@code Arrays#asList} differs from
   * {@code Lists#newArrayList}.
View Full Code Here

Examples of com.google.common.testutils.NullPointerTester.testAllPublicStaticMethods()

    }
  }

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Ordering.class);
   
    // any Ordering<Object> instance should be good enough
    tester.testAllPublicInstanceMethods(Ordering.usingToString());
  }
}
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.