use of com.google.common.testing.NullPointerTester in project core-java by SpineEventEngine.
the class RejectionRoutingShould method pass_null_tolerance_check.
@Test
public void pass_null_tolerance_check() {
final NullPointerTester nullPointerTester = new NullPointerTester().setDefault(RejectionContext.class, RejectionContext.getDefaultInstance());
nullPointerTester.testAllPublicInstanceMethods(rejectionRouting);
nullPointerTester.testAllPublicStaticMethods(RejectionRouting.class);
}
use of com.google.common.testing.NullPointerTester in project guava by hceylan.
the class ObjectArraysTest method testNullPointerExceptions.
@GwtIncompatible("NullPointerTester")
public void testNullPointerExceptions() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(ObjectArrays.class);
}
use of com.google.common.testing.NullPointerTester in project guava by hceylan.
the class RangeNonGwtTest method testNullPointers.
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));
}
use of com.google.common.testing.NullPointerTester in project guava by hceylan.
the class MapMakerInternalMapTest method testNullParameters.
public void testNullParameters() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicInstanceMethods(makeMap(createMapMaker()));
}
use of com.google.common.testing.NullPointerTester in project guava by hceylan.
the class SortedListsTest method testNulls.
@GwtIncompatible("NullPointerTester")
public void testNulls() throws Exception {
NullPointerTester tester = new NullPointerTester();
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);
}
Aggregations