use of com.google.common.testing.NullPointerTester in project guava by google.
the class EvictingQueueTest method testNullPointerExceptions.
// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(EvictingQueue.class);
tester.testAllPublicConstructors(EvictingQueue.class);
EvictingQueue<String> queue = EvictingQueue.create(5);
// The queue must be non-empty so it throws a NPE correctly
queue.add("one");
tester.testAllPublicInstanceMethods(queue);
}
use of com.google.common.testing.NullPointerTester in project guava by google.
the class Collections2Test method testNullPointerExceptions.
// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(Collections2.class);
}
use of com.google.common.testing.NullPointerTester in project guava by google.
the class AtomicsTest method testNullPointers.
public void testNullPointers() {
NullPointerTester tester = new NullPointerTester();
// there aren't any
tester.testAllPublicConstructors(Atomics.class);
tester.testAllPublicStaticMethods(Atomics.class);
}
use of com.google.common.testing.NullPointerTester in project guava by google.
the class RateLimiterTest method testNulls.
public void testNulls() {
NullPointerTester tester = new NullPointerTester().setDefault(SleepingStopwatch.class, stopwatch).setDefault(int.class, 1).setDefault(double.class, 1.0d);
tester.testStaticMethods(RateLimiter.class, Visibility.PACKAGE);
tester.testInstanceMethods(RateLimiter.create(stopwatch, 5.0), Visibility.PACKAGE);
}
use of com.google.common.testing.NullPointerTester in project guava by google.
the class ThreadFactoryBuilderTest method testNulls.
public void testNulls() {
NullPointerTester npTester = new NullPointerTester();
npTester.testAllPublicConstructors(ThreadFactoryBuilder.class);
npTester.testAllPublicStaticMethods(ThreadFactoryBuilder.class);
npTester.testAllPublicInstanceMethods(builder);
}
Aggregations