Search in sources :

Example 96 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by google.

the class TreeTraverserTest method testNulls.

// NullPointerTester
@GwtIncompatible
public void testNulls() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(ADAPTER);
    tester.testAllPublicInstanceMethods(BIN_ADAPTER);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 97 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by google.

the class MacHashFunctionTest method testNulls.

public void testNulls() {
    NullPointerTester tester = new NullPointerTester().setDefault(String.class, "HmacMD5").setDefault(Key.class, MD5_KEY);
    tester.testAllPublicConstructors(MacHashFunction.class);
    tester.testAllPublicInstanceMethods(new MacHashFunction("HmacMD5", MD5_KEY, "toString"));
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester)

Example 98 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by google.

the class IntMathTest method testNullPointers.

// NullPointerTester
@GwtIncompatible
public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(int.class, 1);
    tester.testAllPublicStaticMethods(IntMath.class);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 99 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by google.

the class LongMathTest method testNullPointers.

// NullPointerTester
@GwtIncompatible
public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(int.class, 1);
    tester.setDefault(long.class, 1L);
    tester.testAllPublicStaticMethods(LongMath.class);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 100 with NullPointerTester

use of com.google.common.testing.NullPointerTester in project guava by google.

the class MonitorTestCase method testNulls.

public void testNulls() {
    // Inhibit IllegalMonitorStateException
    monitor.enter();
    new NullPointerTester().setDefault(TimeUnit.class, TimeUnit.SECONDS).setDefault(Monitor.Guard.class, new TestGuard(true)).testAllPublicInstanceMethods(monitor);
}
Also used : NullPointerTester(com.google.common.testing.NullPointerTester)

Aggregations

NullPointerTester (com.google.common.testing.NullPointerTester)165 GwtIncompatible (com.google.common.annotations.GwtIncompatible)100 Test (org.junit.Test)20 UnhashableObject (com.google.common.collect.testing.UnhashableObject)2 BoundedContext (io.spine.server.BoundedContext)2 FileSystem (java.nio.file.FileSystem)2 Sets.newEnumSet (com.google.common.collect.Sets.newEnumSet)1 Sets.newHashSet (com.google.common.collect.Sets.newHashSet)1 Sets.powerSet (com.google.common.collect.Sets.powerSet)1 AnEnum (com.google.common.collect.testing.AnEnum)1 SafeTreeSet (com.google.common.collect.testing.SafeTreeSet)1 ExecutionList (com.google.common.util.concurrent.ExecutionList)1 BuildConfiguration (com.google.devtools.build.lib.analysis.config.BuildConfiguration)1 FieldDescriptor (com.google.protobuf.Descriptors.FieldDescriptor)1 StringValue (com.google.protobuf.StringValue)1 AggregatePart.getConstructor (io.spine.server.aggregate.AggregatePart.getConstructor)1 MessageWithStringValue (io.spine.test.messages.MessageWithStringValue)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 IOException (java.io.IOException)1 Constructor (java.lang.reflect.Constructor)1