use of com.google.common.testing.NullPointerTester in project guava by google.
the class BigIntegerMathTest method testNullPointers.
// NullPointerTester
@GwtIncompatible
public void testNullPointers() {
NullPointerTester tester = new NullPointerTester();
tester.setDefault(BigInteger.class, ONE);
tester.setDefault(int.class, 1);
tester.setDefault(long.class, 1L);
tester.testAllPublicStaticMethods(BigIntegerMath.class);
}
use of com.google.common.testing.NullPointerTester in project guava by google.
the class HashingOutputStreamTest method testChecksForNull.
public void testChecksForNull() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicInstanceMethods(new HashingOutputStream(Hashing.md5(), new ByteArrayOutputStream()));
tester.testAllPublicStaticMethods(HashingOutputStream.class);
tester.testAllPublicConstructors(HashingOutputStream.class);
}
use of com.google.common.testing.NullPointerTester in project bazel by bazelbuild.
the class ImmutableSortedKeyMapTest method nullPointers.
@Test
public void nullPointers() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(ImmutableSortedKeyMap.class);
tester.testAllPublicInstanceMethods(new ImmutableSortedKeyMap.Builder<String, Object>());
tester.testAllPublicInstanceMethods(ImmutableSortedKeyMap.<String, Integer>of());
tester.testAllPublicInstanceMethods(ImmutableSortedKeyMap.of("one", 1));
tester.testAllPublicInstanceMethods(ImmutableSortedKeyMap.of("one", 1, "two", 2));
}
use of com.google.common.testing.NullPointerTester in project guava by hceylan.
the class UnsignedBytesTest method testNulls.
public void testNulls() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.setDefault(byte[].class, new byte[0]);
tester.testAllPublicStaticMethods(UnsignedBytes.class);
}
use of com.google.common.testing.NullPointerTester in project guava by hceylan.
the class UnsignedIntegerTest method testNulls.
@GwtIncompatible("NullPointerTester")
public void testNulls() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.setDefault(UnsignedInteger.class, UnsignedInteger.ONE);
tester.testAllPublicStaticMethods(UnsignedInteger.class);
}
Aggregations