Package com.google.common.testing

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


  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() throws Exception {
    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){
View Full Code Here


  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Strings.class);
  }
}
View Full Code Here

  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(Throwable.class, new SomeCheckedException());
    tester.setDefault(Class.class, SomeCheckedException.class);
    tester.testAllPublicStaticMethods(Throwables.class);
  }
}
View Full Code Here

  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointerExceptions() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Enums.class);
  }

  @Retention(RetentionPolicy.RUNTIME)
  private @interface ExampleAnnotation {}
View Full Code Here

  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Objects.class);
  }
}
View Full Code Here

    tester.setDefault(Comparator.class, Ordering.natural());
    tester.setDefault(Comparable.class, "");
    tester.setDefault(Iterator.class, Iterators.emptyIterator());
    tester.setDefault(Iterable.class, Collections.emptySet());
    tester.setDefault(Comparable[].class, new Comparable[0]);
    tester.testAllPublicStaticMethods(ImmutableSortedMultiset.class);
  }

  public void testSerialization_empty() {
    Collection<String> c = ImmutableSortedMultiset.of();
    assertSame(c, SerializableTester.reserialize(c));
View Full Code Here

    tester.setDefault(Function.class, Functions.identity());
    tester.setDefault(List.class, LIST_WITH_DUPS);
    tester.setDefault(Comparable.class, 2);
    tester.setDefault(KeyPresentBehavior.class, KeyPresentBehavior.ANY_PRESENT);
    tester.setDefault(KeyAbsentBehavior.class, KeyAbsentBehavior.NEXT_HIGHER);
    tester.testAllPublicStaticMethods(SortedLists.class);
  }
}
View Full Code Here

 
  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(Multiset.class, ImmutableMultiset.of());
    tester.testAllPublicStaticMethods(Multisets.class);
  }
}
View Full Code Here

public class ObjectArraysTest extends TestCase {

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

  @GwtIncompatible("ObjectArrays.newArray(Class, int)")
  public void testNewArray_fromClass_Empty() {
    String[] empty = ObjectArrays.newArray(String.class, 0);
View Full Code Here

  public void testNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(BoundType.class, BoundType.OPEN);
    tester.setDefault(Comparable.class, 0);

    tester.testAllPublicStaticMethods(Range.class);
    tester.testAllPublicStaticMethods(Ranges.class);

    tester.testAllPublicInstanceMethods(Ranges.all());
    tester.testAllPublicInstanceMethods(Ranges.open(1, 3));
  }
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.