Package com.google.common.testutils

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


  }

  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableSortedMap.class);
    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.<String, Integer>naturalOrder());
    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      tester.testAllPublicInstanceMethods(ImmutableSortedMap.of());
View Full Code Here


    tester.testAllPublicInstanceMethods(
        ImmutableSortedMap.<String, Integer>naturalOrder());
    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      tester.testAllPublicInstanceMethods(ImmutableSortedMap.of());
      tester.testAllPublicInstanceMethods(ImmutableSortedMap.of("one", 1));
      tester.testAllPublicInstanceMethods(
          ImmutableSortedMap.of("one", 1, "two", 2, "three", 3));
    }
  }
View Full Code Here

        ImmutableSortedMap.<String, Integer>naturalOrder());
    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      tester.testAllPublicInstanceMethods(ImmutableSortedMap.of());
      tester.testAllPublicInstanceMethods(ImmutableSortedMap.of("one", 1));
      tester.testAllPublicInstanceMethods(
          ImmutableSortedMap.of("one", 1, "two", 2, "three", 3));
    }
  }
View Full Code Here

    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      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

  }

  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(ImmutableMap.class);
    tester.testAllPublicInstanceMethods(
        new ImmutableMap.Builder<Object, Object>());
    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      tester.testAllPublicInstanceMethods(ImmutableMap.of());
View Full Code Here

    tester.testAllPublicInstanceMethods(
        new ImmutableMap.Builder<Object, Object>());
    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      tester.testAllPublicInstanceMethods(ImmutableMap.of());
      tester.testAllPublicInstanceMethods(ImmutableMap.of("one", 1));
      tester.testAllPublicInstanceMethods(
          ImmutableMap.of("one", 1, "two", 2, "three", 3));
    }
  }
View Full Code Here

        new ImmutableMap.Builder<Object, Object>());
    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      tester.testAllPublicInstanceMethods(ImmutableMap.of());
      tester.testAllPublicInstanceMethods(ImmutableMap.of("one", 1));
      tester.testAllPublicInstanceMethods(
          ImmutableMap.of("one", 1, "two", 2, "three", 3));
    }
  }
View Full Code Here

    if (false) {
      // these tests aren't included due to a bug in NullPointerTester
      // TODO: fix that bug, add these tests
      tester.testAllPublicInstanceMethods(ImmutableMap.of());
      tester.testAllPublicInstanceMethods(ImmutableMap.of("one", 1));
      tester.testAllPublicInstanceMethods(
          ImmutableMap.of("one", 1, "two", 2, "three", 3));
    }
  }

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

    assertNull(array[1]);
  }

  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(c);
  }

  protected Collection<String> createSample() {
    @SuppressWarnings("hiding")
    Collection<String> c = create();
View Full Code Here

  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.